I have a tab that has its content set to an object (a TFS WorkItem). I have a DataTemplate for the WorkItem type.
When I set the object to the tab it displays nicely.
However, when I update one of the collections on the object (the list of links) this change is not refreshed to the view.
I have tried making my WorkItem a DependencyPr...
I have a WPF Data template defined in my Windows.Resources section.
I would like to access this (really a list box on it) via the code behind. How can I do this?
I can't get what I want via an event because I want to get the reference in the completed step of a BackGroundWorker. (Ie no sender (that is a UI element) to go off of there...
I have a DataTemplate that I want to find using the FrameworkElement.FindResource(). To do that I need to have a key on the data template.
The problem is that x:key and assigning a data type are mutually exclusive. (Reference)
So, once I set the DataType for my template, how do I find the Key value? Is there some formula that conver...
I've got a list of custom "pages" in my app. Each page represents a different UI view. They have some simple properties, like a string title and an icon, but they also have a number of complex properties, consisting of controls to insert into the main toolbar, a main content area, custom statusbar panels, etc. The page type derives from ...
I have a class (MockWI) that I have defined the following DataTemplate in app.xml
<DataTemplate DataType="{x:Type local:MockWI}">
<Button Content="{Binding Name}"/>
</DataTemplate>
In my code I need to find the UI object that an instance of MockWI has.
Right now I do this:
Button elt = new Button { Content = myMockWI};
But tha...
This is very similar to this question I asked earlier. I am hoping to be clearer and get a different answser.
I have a Data Object (called MockUI). It has a data template (in app.xaml) like this:
<DataTemplate DataType="{x:Type local:MockWI}">
<Button Content="{Binding Name}"/>
</DataTemplate>
In my code I want create a UI obje...
Hello, I am trying to create a user control within a WPF application that will serve as a data template for a listbox item. The user control a grid with 4 textblocks. This control also contains other shapes and images more for visual aid than anything so I am omitting them from the code in this question for clarity.
When I drop the use...
I've got a data template for a list box item similar to the one on this page...
link
I would like to take it a step further and do something to highlight the items when they change. For example, using the code in the link above, I would like to put a trigger to do something when Widget.Quantity changes. Maybe make the quiantity item (no...
I have a ListView that allows the user to change the ViewBase through a Context Menu (it acts like a simplified version of windows explorer).
<ListView Name="lv" Grid.Row ="0" Grid.Column ="1" >
<ListView.ContextMenu>
<ContextMenu>
<MenuItem Header="View1" Click="SwitchViewMenu"/>
<M...
When one presses a letter (or a sequence of letters) in a windows combobox or in a list, automatically the first item that starts with the given letter, is selected.
Is there a declarative way to do the same thing for a WPF ListBox that has it's items bound by the ItemsSource-property and the ItemsTemplate set to a DataTemplate.
...