2
私はデータ駆動型のハブセクションを持っています。ビューモデルには、ツールチップとして表示したいテキストが含まれていますが、それを理解できません。ここでUWP - xamlの画像上にデータバインドされたツールチップを作成する
が重要な抜粋です:
<HubSection x:Uid="MyHub" x:Name="MyHubSection" Width="311">
<HubSection.Header>
<TextBlock x:Uid="HubMSectionHeader"
Style="{StaticResource MainHubSectionHeaderStyle}" Text="Friends"/>
</HubSection.Header>
<DataTemplate>
<StackPanel>
<Button x:Name="InviteButton" Content="Send Invite" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Click="InviteButton_Click"/>
<StackPanel >
<Grid>
<GridView ItemsSource="{Binding Friends}" Background="{ThemeResource HubBackground}" x:Name="FriendGrid" >
<GridView.ItemTemplate >
<DataTemplate>
<Image Source="{Binding ProfilePhotoBitmap, Mode=TwoWay}" Height="100" Opacity="1" Stretch="Uniform" Tapped="Friend_Tapped"/>
<ToolTipService.ToolTip>
<TextBlock Text="{Binding FullName}"/>
</ToolTipService.ToolTip>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
</Grid>
</StackPanel>
</StackPanel>
</DataTemplate>
</HubSection>
です。 +1 –
ありがとうございます。それだった! –
:)ハッピーコーディング –