Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox binding to self
Message
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Miscellaneous
Thread ID:
01286103
Message ID:
01286173
Views:
17
Hi,

Thx, works fine. I knew it should be simple but was overcomplicating things (trying to use 'RelativeSource="Self"' and suchlike!)

Thanks again,
Viv

>
><ComboBox Width="Auto" x:Name="myComboBox" Foreground="{Binding ElementName=myComboBox, Path=SelectedItem.Foreground}">
> 	<ComboBoxItem Content="Apples" Foreground="Red" />
>	<ComboBoxItem Content="Oranges" Foreground="Orange"/>
>	<ComboBoxItem Content="Pears" Foreground="Green"/>
></ComboBox>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform