Ich arbeite an einem Projekt, in dem ich Inhalt mit JSON Binding in der Grid-Ansicht setze, aber jetzt möchte ich Text von Element, wenn es ausgewählt ist. XAML CODE:Wie erhält man Text in GridView, wenn ausgewählt?
<GridView ItemsSource="{Binding}" HorizontalAlignment="Center" Margin="0,10,0,0" x:Name="dataList" VerticalAlignment="Center" SelectionMode="None" SelectionChanged="dataList_Selection">
<GridView.ItemTemplate>
<DataTemplate>
<StackPanel Width="450" Height="300">
<Image Source="{Binding Top}" Margin="0,0,0,0" Stretch="None" />
<TextBlock x:Name="title" Text="{Binding Title}" Foreground="Black" HorizontalAlignment="Center" FontFamily="Assets/Font/MixBrush.ttf#MixBrush" FontWeight="Bold" FontSize="50" Margin="0,10,0,0" />
<Image Source="{Binding Bottom}" Margin="0,0,0,0" Stretch="None" />
<TextBlock Text="{Binding first}" Foreground="Black" HorizontalAlignment="Center" FontFamily="Assets/Font/Comfortaa_Regular.ttf#Comfortaa" FontSize="20" Margin="0,50,0,0" />
<TextBlock Text="{Binding second}" Foreground="Black" HorizontalAlignment="Center" FontFamily="Assets/Font/Comfortaa_Regular.ttf#Comfortaa" FontSize="20" Margin="0,0,0,0" />
<TextBlock Text="{Binding third}" Foreground="Black" HorizontalAlignment="Center" FontFamily="Assets/Font/Comfortaa_Regular.ttf#Comfortaa" FontSize="20" Margin="0,0,0,0" />
</StackPanel>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
Hier möchte ich Text von "Titel" programmgesteuert erhalten. Bitte teilen Sie Ihr Wissen mit mir. :-)
********************** Danke ******************* *****
Für Ihre sehr freundliche Informationen benutze ich "Titel" in Datenvorlage und es ist nicht programmgesteuert erreichbar .. !! :) –
"Für Ihre sehr freundliche Informationen": D: D: D Entschuldigung, habe ich nicht bemerkt :) – SeM
Kein Problem, bro .. :) –