C
C#3y ago
frknztrk

WPF DataTemplate access the button inside

<ItemsControl x:Name="versesTextData">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" Grid.Column="0" HorizontalAlignment="Left" Margin="10,0,10,0">
<TextBlock Margin="15 5 30 5" TextTrimming="CharacterEllipsis" Text="{Binding VerseTr}" VerticalAlignment="Center" FontSize="22" Foreground="#FF1C1E2F" FontFamily="{DynamicResource PoppinsMedium}" />
<Button Visibility="Collapsed" x:Name="fulltextTr" Style="{DynamicResource versesAllShowButton}" Tag="Tamamını Göster" Click="trFullTextLoad" />
</StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="1" HorizontalAlignment="Right" Margin="10,0,10,0">
<TextBlock Margin="15 5 30 5" TextTrimming="CharacterEllipsis" Text="{Binding VerseArabic}" FontSize="22" Foreground="#FF1C1E2F" FontFamily="XB Zar" />
<Button Visibility="Collapsed" x:Name="fulltextArabic" Style="{DynamicResource versesAllShowButton}" Tag="Tamamını Göster" Click="arabicFullTextLoad" />
</StackPanel>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ItemsControl x:Name="versesTextData">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical" Grid.Column="0" HorizontalAlignment="Left" Margin="10,0,10,0">
<TextBlock Margin="15 5 30 5" TextTrimming="CharacterEllipsis" Text="{Binding VerseTr}" VerticalAlignment="Center" FontSize="22" Foreground="#FF1C1E2F" FontFamily="{DynamicResource PoppinsMedium}" />
<Button Visibility="Collapsed" x:Name="fulltextTr" Style="{DynamicResource versesAllShowButton}" Tag="Tamamını Göster" Click="trFullTextLoad" />
</StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="1" HorizontalAlignment="Right" Margin="10,0,10,0">
<TextBlock Margin="15 5 30 5" TextTrimming="CharacterEllipsis" Text="{Binding VerseArabic}" FontSize="22" Foreground="#FF1C1E2F" FontFamily="XB Zar" />
<Button Visibility="Collapsed" x:Name="fulltextArabic" Style="{DynamicResource versesAllShowButton}" Tag="Tamamını Göster" Click="arabicFullTextLoad" />
</StackPanel>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server