Click here to Skip to main content
15,910,083 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF ComboBox Binding Problem Pin
Kevin Marois12-Aug-12 11:47
professionalKevin Marois12-Aug-12 11:47 
QuestionTreeView Control Item Styling Pin
Andy_L_J12-Aug-12 2:38
Andy_L_J12-Aug-12 2:38 
I have a TreeView Control populated by a Public Property in a ViewModel:

XAML
<TreeView HorizontalAlignment="Stretch" Margin="5" Name="TreeView1" 
    VerticalAlignment="Stretch" Grid.Row="2" 
    ItemsSource="{Binding Path=AssetTree.FirstGen}">
    <TreeView.ItemContainerStyle>
        <Style TargetType="{x:Type TreeViewItem}">
	    <Setter Property="IsExpanded" Value="{Binding IsExpanded., Mode=TwoWay}"/>
	    <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
	    <Setter Property="FontWeight" Value="Normal"/>
	    <Style.Triggers>
	        <Trigger Property="IsSelected" Value="True">
	            <Setter Property="FontWeight" Value="Bold"/>
	        </Trigger>
	    </Style.Triggers>
        </Style>
    </TreeView.ItemContainerStyle>
    <TreeView.ItemTemplate>
	<HierarchicalDataTemplate ItemsSource="{Binding Children}">
	    <StackPanel Orientation="Horizontal">
		 <Image Source="/MMS.Modules.Maintenance;component/Images/Tooling.png" Height="20"/>
		 <TextBlock Text="{Binding Code}"/>
	    </StackPanel>
								
	</HierarchicalDataTemplate>
    </TreeView.ItemTemplate>
</TreeView>


How do I bind the Image control to a property of the child collection? e.g. the Category property?
Do I use a converter for this?
I don't speak Idiot - please talk slowly and clearly

"I have sexdaily. I mean dyslexia. Fcuk!"

Driven to the arms of Heineken by the wife

AnswerRe: TreeView Control Item Styling Pin
SledgeHammer0113-Aug-12 10:25
SledgeHammer0113-Aug-12 10:25 
GeneralGroupbox visibility problem in WPF after debugging and changing the combobox value Pin
karthik bandaru8-Aug-12 23:24
karthik bandaru8-Aug-12 23:24 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
Ed Hill _5_9-Aug-12 0:06
Ed Hill _5_9-Aug-12 0:06 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
karthik bandaru9-Aug-12 0:23
karthik bandaru9-Aug-12 0:23 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
Ed Hill _5_9-Aug-12 0:31
Ed Hill _5_9-Aug-12 0:31 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
karthik bandaru9-Aug-12 0:42
karthik bandaru9-Aug-12 0:42 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
Ed Hill _5_9-Aug-12 0:56
Ed Hill _5_9-Aug-12 0:56 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
Ed Hill _5_9-Aug-12 0:47
Ed Hill _5_9-Aug-12 0:47 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
karthik bandaru9-Aug-12 0:50
karthik bandaru9-Aug-12 0:50 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
karthik bandaru9-Aug-12 2:10
karthik bandaru9-Aug-12 2:10 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
Ed Hill _5_9-Aug-12 2:24
Ed Hill _5_9-Aug-12 2:24 
SuggestionRegarding MVVM framework for WPF Pin
Member 92251325-Aug-12 3:55
Member 92251325-Aug-12 3:55 
GeneralRe: Regarding MVVM framework for WPF Pin
Richard MacCutchan5-Aug-12 6:55
mveRichard MacCutchan5-Aug-12 6:55 
GeneralWPF Update UI When Collection Changes Pin
Kevin Marois1-Aug-12 11:05
professionalKevin Marois1-Aug-12 11:05 
GeneralRe: WPF Update UI When Collection Changes Pin
Pete O'Hanlon1-Aug-12 11:44
mvePete O'Hanlon1-Aug-12 11:44 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois1-Aug-12 11:52
professionalKevin Marois1-Aug-12 11:52 
GeneralRe: WPF Update UI When Collection Changes Pin
Pete O'Hanlon1-Aug-12 12:10
mvePete O'Hanlon1-Aug-12 12:10 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois1-Aug-12 12:23
professionalKevin Marois1-Aug-12 12:23 
GeneralRe: WPF Update UI When Collection Changes Pin
Pete O'Hanlon1-Aug-12 12:45
mvePete O'Hanlon1-Aug-12 12:45 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois1-Aug-12 12:51
professionalKevin Marois1-Aug-12 12:51 
GeneralRe: WPF Update UI When Collection Changes Pin
Mycroft Holmes1-Aug-12 13:10
professionalMycroft Holmes1-Aug-12 13:10 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois1-Aug-12 13:27
professionalKevin Marois1-Aug-12 13:27 
GeneralRe: WPF Update UI When Collection Changes Pin
Kevin Marois6-Aug-12 7:25
professionalKevin Marois6-Aug-12 7:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.