TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Tuan Le
NA
4
3.5k
Combobox & SelectedItem
Oct 29 2012 8:27 AM
Hi,
I have a DataTemplate:
< DataTemplate >
<Grid>
<StackPanel Orientation="Horizontal" >
<Image Source="{Binding SomeImage}" />
<TextBlock Text={"Bingding SomeText}" />
</StackPanel>
</Grid>
< /DataTemplate>
And a toggleButton:
< ToggleButton IsChecked = "{Binding SomeBinding, Mode = TwoWay}" >
<ToggleButton.Content>
<Image Source="{Bingding Path=SelectedValue />
</ToggleButton.Content>
< /ToggleButton>
And a combobox:
< ComboBox ItemSource="{Binding SomeItemSource}" ItemTemplate="{StaticResource ComboboxItemTemplate}"
SelectedItem="{Binding SelectTedItemActive}" SelectedValuePath="SelectTedValueImage">
< /ComboBox>
In the code behind:
ItemSource:
SomeItemSource contains two data: Image1 and Image2
SelectedItem:
SelectedItemActive is a property.
When I run the application and press the combobox, it pops up with Imag1 and Image2 and I can choose one of them,
If I now choose Image1 and next time I choose Image2 (Image1 -> Image2), the code go to SelectTedItemActive
because of selectedValuechange.
If I now choose Image1 and next time I choose Imag1 (Image1 -> Image1), the code NOT go to SelecttedItemAvive because is not selectedValuechange.
My question is how can I force the code to go to SelectTedItemActive although is not selectedValuechange (Image1 -> Image1)? Thanks you very much.
Reply
Answers (
0
)
WCF Silverlight Enabled services not retriving the data from SQL in Silverlight application.
[Help] an example code of Total Commander write in Windows Form C#