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
aadi kumary
NA
25
19.1k
Displaying Image alternative in listbox (wpf application )
May 27 2014 1:47 AM
Hi,
Displaying Image alternative in listbox based on AlternationCount.
this is my code ..but it is not displaying any image ...
is their any mistake... Help me
<ListBox SelectionChanged="lstTiles_SelectionChanged" AlternationCount="2"
MouseDoubleClick="lstTiles_MouseDoubleClick"
x:Name="lstTiles"
Drop="lstTiles_Drop_1" AllowDrop="True"
ItemContainerStyle="{DynamicResource SimpleListBoxItem}"
Margin="0" >
<ListBox.ItemTemplate>
<DataTemplate>
<Canvas>
<TextBlock VerticalAlignment="Top" Text="{Binding Name}" FontSize="16" FontWeight="Bold"
Margin="90,20,0,0" Foreground="Black" />
<Image Source="Images\Tiles\Folder-n-design(right).png" Name="imgLoadRight" Margin="0,10,0,0" Loaded="imgLoad_Loaded_1" Visibility="Collapsed" />
<Image Source="Images\Tiles\Folder-n-design(center).png" Name="imgLoadCenter" Margin="0,100,0,0" Loaded="imgLoad_Loaded_1" Visibility="Collapsed" />
</Canvas>
<DataTemplate.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
<Setter TargetName="imgLoadRight" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter TargetName="imgLoadCenter" Property="Visibility" Value="Visible" />
</Trigger>
</DataTemplate.Triggers>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Aadi kumar
Reply
Answers (
1
)
izmir araƧ kiralama
How to display AlternationIndex in ListBox