wpf

add menu item to default context menu

I'd like to add a menu item to the default ContextMenu of a RichTextBox. I can create a new context menu but then I loose the spell check suggestions that show up in the default menu. Is there a way to add an item without re-implementing everything? ...

How do I get an animated gif to work in WPF?

What control type should I use - Image, MediaElement, etc?? ...

Free DayView Calendar for WPF?

Hi! Is there a free DayView Calendar for WPF like this one? http://www.codeproject.com/KB/selection/Calendardayview.aspx Thanks in advance! Cheers from Argentina! ...

WPF Databinding and cascading Converters?

hi there, i wonder if it is possible to cascade converters when using wpf databinding. e.g. something like <SomeControl Visibility="{Binding Path=SomeProperty, Converter={StaticResource firstConverter}, Converter={StaticResource secondConverter}}"/> is it possible at all or do i have to create a custom converter that combines the fu...

Databinding Fail - Help me get started with simple example

OK... I'm a VB.NET WinForms guy trying to understand WPF and all of its awesomeness. I'm writing a basic app as a learning experience, and have been reading lots of information and watching tutorial videos, but I just can't get off the ground with simple DataBinding, and I know I'm missing some basic concept. As much as I'd love it, I ha...

Scroll WPF Listview to specific line

WPF, Browserlike app. I got one page containing a ListView. After calling a PageFunction I add a line to the ListView, and want to scroll the new line into view: ListViewItem item = ItemContainerGenerator.ContainerFromIndex(index) as ListViewItem; if (item != null) ScrollIntoView(item); This works. As long as the new line is i...

Convert WPF Application to SilverLight

Is it possible to convert an existing WPF Application to SilverLight automatically/with minimal effort? ...

Get shortcut text from Richtextbox

I need to get the shortcut text (Ctrl + B, Ctrl + I, etc.) of a RichTextBox. I can't use these static ones because they depend on the country language of the user. Can anybody help me with this? Thank you ...

Display WPF modal window/dialog/panel the same way as a NSWindow can be displayed like a sheet in Cocoa

I am looking for a way to display a modal window in WPF the same way as a window in Cocoa can be displayed as a sheet, i.e. it slides down from the titlebar in front of the main parent window. My guess is that this would be accomplished by having the modal window as a user control which is loaded into a panel when displayed, and that th...

WPF with Windows Forms - STAThread

I am a newbie to WPF and have a couple of questions about WPF and Windows Forms integration. I have an existing Visual C# Windows Forms application. I would like to integrate it with a WPF window, that can be shown on a button click. This was not possible as WPF expects the calling thread to be a STAThread and by default WinForm assu...

Can't create xmlns reference to other project in XAML

I have a WPF project defined like this: MyApp.sln MyAppWPF MyApp.Domain In one of my xaml files in the MyAppWPF project I'm trying to reference a class defined in MyApp.Domain project. I have a project reference in MyAppWPF to MyApp.Domain. I am trying to create the reference like this: <Window x:Class="MyAppWPF.Window1" ...

Can pixel shaders be used when rendering to an offscreen surface?

I'm considering integrating some D3D code I have with WPF via the new D3DImage as described here: My question is this: Do pixel shader's work on offscreen surfaces? ...

How can I obtain the coordinates of a selected item container in a WPF ListView

I want to display some WPF elements near to the selected item of a ListView. How can I obtain the coordinates (screen or relative) of the selected ListViewItem? <ListView x:Name="TechSchoolListView" ClipToBounds="False" Width="Auto" Height="Aut...

How to outline a UIElement in Partial-Trust?

I asked a similar question about this previously, but I did not specify that this needs to work in Partial-Trust mode. Unfortunately both correct answers (using UIElement.BitmapEffect or UIElement.Effect) are not allowed in Partial-Trust, because it requires UIPermissionWindow.AllWindows. Does anyone know of a way to do something simil...

How to set DataGridCell's template in WpfToolkit's DataGrid?

Hi, Is it possible to set DataGridCell's template when using WpfToolkit's DataGrid? Or is it possible to set style property for a single cell at the time? I know that there is a TemplateColumn class which lets the user set templates for displaying and editing cell's data but that's not what I'm looking for. I need to display two-dimen...

Can I define a cross container TabIndex order in XAML (or code-beside)

Control.TabIndex Only allows me to overide the Tab order of controls in a given container. Is there a way to specify this across all the controls in, for example a UserControl, regardless of the contains used to arrange the controls. Cheers, Jan ...

Drag WPF Popup control

hi there, the WPF Popup control is nice, but somewhat limited in my opinion. is there a way to "drag" a popup around when it is opened (like with the DragMove() method of windows)? can this be done without big problems or do i have to write a substitute for the popup class myself? thanks ...

How do I update a label that is in a ControlTemplate of a Toolbar in WPF?

I have a ControlTemplate that is made up of a ToolBarTray and a ToolBar. In my ToolBar, I have several buttons and then a label. I want to be able to update the label in my toolbar with something like "1 of 10" My first thought is to programatically find the label and set it, but I'm reading that this should be done with Triggers. ...

How to speed up WPF programs?

I love programming with and for Windows Presentation Framework. Mostly I write browser-like apps using WPF and XAML. But what really annoys me is the slowness of WPF. A simple page with only a few controls loads fast enough, but as soon as a page is a teeny weeny bit more complex, like containing a lot of data entry fields, one or two t...

Changing (Enable/Disable) GroupStyle in ListView for different category items

Hi All, How can I switch between GroupStyles for ListView based on some conditions at run time. For instance I need to use Default for items that that have GroupStyle Header name null, and if it is not null then use custom GroupStyle them? I tried GroupStyleSelector, and it doesn't work, because it works for multi level grouping, and ...