Greetings,
I'm using WPF with a Model-View-ViewModel pattern, and I have a view model with an IsSelected property which I want to bind to a TreeViewItem's IsSelected property for all TreeViewItems in the scope. I'm attempting to do this with a Style and a Setter. This works apparently for the root-level TreeViewItems, but not for their ...
I am binding a ToolBar to a collection of command view model objects. The objects in the collection have a property IsSeparator that when true I would like represented with a <Separator/> in the ToolBar.
My basic markup looks like this:
<ToolBar Grid.Row="1" ItemsSource="{Binding Path=ToolBarCommands}">
<ToolBar.ItemTemplate>
...
I just noticed some strange behaviour of WPF's TreeView. I added both ItemContainerStyle to bind to "IsSelected" of my ViewModel and an ItemsTemplated for custom display of my data. But now the user cannot change the selected node anymore. For testing purposes I created a similar UI using ListView and Expander. This version works as exce...
Hello,
Just look for strategies that have been successful in rendering hierarchies that represent inheritance structures using SL3/4 TreeViews. I need to render certain nodes differently than others, depending upon what kind of container they are (a choice between things, or simply a list of related things, etc.)
So far, I've been ver...
I have the following XML being set on my treeview:
<Root Value="YES">
<Child Name="Test">
<Sibling Data="Yes">
<Last UserData="1"/>
</Sibling>
<Sibling Data="No"/>
</Child>
<Child Name="Test2"/>
</Root>
and then I have set the following code in my window:
<Window.Resources>
<XmlDataProvider x:Key="dataProvider" XPath="R...
I am using MVVM pattern with Silverlight 4 to bind a collection of TODO items to a ListBox.
There is a property IsSelected on each TODO entity. This allow for multiple selections to be made in the UI that are bound back to the ViewModel. At the same time any changes made by the ViewModel get reflected in the View.
I am basically trying...
The following is similar to what I'm trying to accomplish. However, I get an "Invalid PropertyDescriptor value" error on the Template Setter. I suspect it's because I didn't specify a target type for the Style; however, I don't know the container type for ItemsControl.
<ItemsControl>
<ItemsControl.ItemContainerStyle>
<Sty...
So heres the situation, i have a listbox that has a itemcontainerstyle with a template that contains a usercontrol. Inside this usercontrol is:
<Grid Name="Label" MouseLeftButtonDown="Label_MouseLeftButtonDown" >
<TextBlock Name="Text" />
</Grid>
</Border>
<Grid Name="Editor" Visibility="Collapsed" >
...
Good afternoon,
I have a listbox that consumes a list of items from a model, Addresses and RAddresses (inherited from Addresses)
Now, previously I have been creating my item templates in the ItemContainerStyle so that I have only my own focus visuals (i.e. no dotted line, no light grey rectangle, etc). This has worked fine in the past...