wpf-controls

How to set the border for a WPF DataGrid Row which is currently having the focus

Hi, I want to set the border for a DataGrid Row which is currently having the focus. But not the seleced row because when the Multi selection is enabled for the datagrid then there is a chance that multiple rows can be selected. I need a solution in XAML Thanks in advance! ...

WPF - Adding a Rowheader to a ListView Grid View

I need to add a rowheader to a Listview GridView. it needs to act like a datagrid rowheader, sop it should be freezable. is thsi possible? can anyone show me some source code to do this? Thanks ...

Load content to the page with in XML?

I'd like to find out about the best technique to generate multiple container boxes/thumbnails of the content with xml that are loaded into wrap panel. It can be stackpanels or listboxes with textblocks and checkboxes in them. Any sample or helpful source of information is highly appreciated. Thank you in advance. ...

adding custom routed event of user control to xaml of a window in wpf

Hi Experts, I am little new to Command binding so this might be a trivial question to many. I know that we can add Command bindings in xaml of a window and give its correspondng property in viewmodel. This viewmodel will be given to the DataContext of the window. Something like the following --app.xaml.cs mainWindow.DataContext = view...

How to inherit/extend styles from a resource dictionary?

I am having trouble extending one of my styles that I have defined in the Windows dictionary. Alone, it seems to apply the style to my controls as expected. However, if try to extend the style in one of my userControls, using the basedOn property, it simply overrides the main one and all the base styles dissapear. Here's an example: ...

WPF ObjectContext Attach Detach - Not Working

Hello, I am implementing an ObservableCollection to manage my EF entities. When i want to edit some entity, i create a clone of the entity and i open it up inside a popup window. When the user finishes to edit the cloned entity, i proceed to detach the original entity and then attach the new (cloned and edited) entity. No exception occ...

WPF Newbie Grid Binding Question

I'm new to WPF. I have been been playing around with binding data to a grid. However the example below never calls the method that will be used to populate the grid. What do I need to do to make this go? <Window x:Class="DataGridView.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:local="clr-nam...

Overview of WPF controls

Hi, I am testing to style the wpf 4.0 controls in my application and can see how some controls contains others. For example is the Label control containing a TextBox control. Have you seen any good overview of how the different controls inherit each other to easier understand the impact on other controls when styling one control? /SP ...

combo box inside a user control disappears when style is applied in wpf

Hi, I am trying to apply a style to a combo box but instead of getting applied the combo box itself disappears. Please check the following xaml code for user control. <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Microsoft_Windows...

Creating WPF ToolKit Chart in Code Behind

Hi, can you help me in this code?: Chart ch = new Chart(); ch.Width = 400; ch.Height = 250; ((PieSeries)ch.Series[0]).ItemsSource = new KeyValuePair[]{ new KeyValuePair("Project Manager", 12), new KeyValuePair("CEO", 25), new KeyValuePair("ACME WPF INC.", 5), new KeyValuePair("Team Leader", 6), new KeyValuePair("Proje...

Expand the combobox and its items when it gets focus

Hi, I want to expand the height of the combobox whenever the combobox gets the Focus. I have used the following code to expand the combobox height. <Style TargetType="{x:Type ComboBox}"> <Style.Triggers> <Trigger Property="IsKeyboardFocusWithin" Value="True"> <Setter Property="RenderTransform"> <...

Distorted display WPF controls

Hi On an application developed using WPF while running in hw accelerated mode, certain controls do not appear properly in certain devices. Same application works fine if the rendering mode is forced to software. However, the rendering tier is 2 and by default it goes to hw mode of rendering in WPF It does not work fine with the system...

Equivalent of WinForms ComboBox.DroppedDown in WPF

Hi all, I have some simple example WinForms code which I am trying to translate into WPF. The idea is to change the items within a ComboBox if a certain item is picked and drop down the ComboBox again if this happened. The WinForms code is: if (list.Text.Equals("C>>")) { comboBox1.Items.Clear(); comboB...

Looking for an object graph tree-view control for WPF

I'm trying to find code or a pre-packaged control that takes an object graph and displays the public properties and values of the properties (recursively) in a TreeView. Even a naive implementation is ok, I just need something to start with. The solution must be in WPF, not winforms or com, etc... ...

How to change SelectedItem in TabControl in animation?

When using Int32 animation like this <Int32Animation Storyboard.TargetName="stagesToGameTabControl" Storyboard.TargetProperty="SelectedIndex" From="0" To="1" BeginTime="0:0:8" Duration="0:0:0" /> when i click by my own on tabitems, raises exception InvalidCastException. Why it raises and how can i fix this? ...

Manipulating Custom User Controls Given Only (x,y) Screen Coordinates (without Mouse)

Given only an (x,y) point on the screen (without being allowed to use the mouse), how can you manipulate a custom UserControl? For example, I have a custom slider that I want to manipulate using only an x, y returned by a vision code (the vision code acts like a mouse, but I am not actually supposed to use the mouse). ...

Is there a way to apply a mask to the textbox of a DatePicker?

I'm working on my first WPF app. In this case, using VS 2010. My users are used to typing the date like this: "09082010" (without the double quotes; this would represent today). After they enter that, then it gets converted to 9/8/2010. I've put the DatePicker control onto the WPF page, but if the user enters 09082010, then it doesn't...

How to localize the WPF 4.0 DatePicker control

When you clear the box on the new WPF 4.0 DatePicker control it shows "Select a date" Is there a way to localize the text? ...

Do you know a WPF MonthPicker control?

I'm looking for a MonthPicker control, a control just like a DatePicker but that you can only select the month and the year. Before start writing one from scrath I would like to know if something like this exists. ...

WPF Calendar graphics not updating

I've got an odd problem with a WPF Calendar control. I have modified the control template to display date highlighting, and basically, it works very well. Highlighted dates are specified in a 31-element string array. If an element is null, it means the date that corresponds to that element isn't highlighted. If the string element isn't n...