wpf

I want to create a combobox in wpf

I want to create a combobox with some style. I dont want old dropdown what we are getting. I want some new dropdown which looks very nice. Is there any way to create a dropdown like that. Plz give me suggestions ...

WPF: More efficient way of displaying quickly-changing images?

I'm using the Image control to display an 8-bit grayscale image that I process myself on a background thread. Once the image is processed, I set the Image.BitmapSource property to point to a new bitmap I create via BitmapSource.Create(). This is all well and good - until I have to rapidly reprocess the image and throw it back on screen. ...

WPF global font size

I'm creating a WPF app and I would like to know the best way to be able to change the font size for every element in the ui. Do I create a resource dictionary and set Styles to set the font size for all the controls I use? What is the best practice? ...

xaml Application Resource Value

I want to set an application wide Value i.e. TextHeight (others as well) and I can't seem to find a reference. IOW, set the Text Height to a StaticResource in various styles, etc. TIA ...

How do you do a gradient fade to Aero glass in a WPF application like Office 2010 does?

I am writing an application in WPF and I would like to have the top of the application fade from a color to Aero glass like the new Office 2010 applications do (screen shots). Really it will be fading the area just below the title bar from glass to a color. (I think that maybe a better way to describe it). ...

WPF ContextMenu

I am using mvvm in a wpf app. I have a ContextMenu inside of a listview and when I right click a listviewitem i want a contextmenu to display a list of Contacts. The following just gives me a contextmenu with no content. Can anyone tell me what I'm doing wrong? <ListView Grid.Row="3" ItemsSource="{Binding Path=Phones}" ...

Selecting a TreeView Item without invoking SelectedItemChanged ?

Hi, In my app, I have a group of 3d objects and they're exposed to the user through a TreeView. When a user selects an item in the TreeView, an SelectedItemChanged event is fired, the corresponding 3d object is set to be selected and is highlighted in the 3d render window. This works fine. What I'm having trouble with is the reverse. I...

WPF Combobox graphical representation of integer

I'd like to use a WPF ComboBox in a similar way to the Flag column on Outlook where you are presented with a choice of different flags to select. My flags will be stored as Integers in the DB, each number is represented by a different color flag. Has anybody already done this or similar. Failing that any pointers to the best way to ach...

WPF ComboBox...how to set the .Text property?

Is there a way to set the .Text property of the Wpf ComboBox control directly? My combobox is bound to a List collection, but when I try to set .Text property in the DropDownClosed event, it totally ignores it. ...

Listview selection color

I'm playing around with wpf and I saw the following article: http://stackoverflow.com/questions/382006/wpf-listview-inactive-selection-color I want to do something similar. I want to put a border around an a listviewitem when it is selected and i want to not change the background color. The reason I want this is I want a color coded lis...

AutoSize ElementHost in Excel 2003 ActionsPane

Hi, I'm hosting a WPF chart in an Excel 2003 ActionsPane. The chart is set to stretch both horizontally and vertically, however, although the ElementHost and the chart fill the ActionsPane horizontally, I have not found a way to enable the ElementHost to fill vertically. The only property that seems to have any affect on the layout of t...

How to control the height of the FlowDocument Zoom Controls

In the following, the zoom controls end up being proportional to the FontSize set in the Expander control: <ScrollViewer> <StackPanel> <Expander MaxHeight="500" Margin="5" Padding="5" FontSize="40pt" Header="Test Header"> <FlowDocumentReader ViewingMode="Scroll" > <FlowDocument Foreground="Black" FontSize="18pt"> ...

Spacing between child controls in WPF Grid

I have a set of Key/Value pairs I want to display on a WPF Window. I'm using a grid to lay them out like so: <Grid Margin="4"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowD...

WPF Drag n drop doesn't fire CommanBinding.CanExecute

Yes, I know it sounds weird, but it doesn't, the question is why, and if there's a work around. It works with everything, even when you hit PrintScreen or Pause keys, CanExecute fires. So after doing a drag drop, in order to make it fire, you have to do "something" else, like a mouse click, focus, hit a key, anything. That'll make the ev...

Get HeaderClick event of a WPF listview.

How can I get the headerclick event of a WPF Listview? ...

Forcing a WPF tooltip to stay on the screen

Hi, I have a tooltip for a Label and I want it to stay open until the user moves the mouse to a different control. I have tried the following properties on the tooltip: StaysOpen="True" and TooltipService.ShowDuration = "60000" But in both cases the tooltip is only displayed for exactly 5 seconds. Why are these values being ignore...

WPF: Bind Collection with Collection to a ListBox with groups

Hi, sometimes WPF is too complex for me. I've got my "Window1" holding a collection of "Group"s. "Group" is a class with a collection of "Person"s. In the end this should be a contact list. What I simply want to do is to show the groups with its person in a ListBox, where the group name of the list groups equals the Name Property of my ...

I want to create a wpf application which will remove the red eye from the image

I want to develop a WPF application. Now what i want is with that wpf application can i able to remove the red eye in the image or i have to use any other third party tool for that. any suggestions plz. Thanks in advance. ...

Undo in WPF Bindings

How to provide an undo / redo using bindings in WPF? e.g. You implement a master-detail view with bindings. After editing your changes were saved automatically using binding. Then you want to undo the changes. Is there something ready-to-use in the binding for WPF? Does WPF provide some structures or interfaces for? This question is n...

Making a collection of WPF Expanders 'expand' exclusively, i.e. only one expanded at a time.

I have a ListBox containing a group of 'Expander' items, and what I would like to do is make the 'IsExpanded' property for each of them exclusive - i.e. if I have 10 Expanders in the ListBox, I'd like only one to be open at a time... Soo at present I have: <Window> <Window.Resources> <DataTemplate x:Key="NormalTemplate"> ...