我正在創建一個Windows 10通用應用程序,並且我已經成功創建了shell.xaml,但我不想使用radioButton而不是使用按鈕和TextBlock。 我想知道如何使TextBlock和按鈕通過listView項目單一可點擊的實體。在Splitview中添加ListviewItem
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<SplitView x:Name="mySplitView" DisplayMode="CompactInline" IsPaneOpen="False"
CompactPaneLength="50" OpenPaneLength="150" Content="{Binding}">
<SplitView.Pane>
<StackPanel Background="{ThemeResource SystemControlBackgroundAccentBrush}">
<Button x:Name="HamburgerButton" FontFamily="Segoe MDL2 Assets" Content=""
Width="50" Height="50" Background="Transparent" Foreground="White" Click="HamburgerButton_Click" />
<StackPanel Orientation="Horizontal">
<Button FontFamily="Segoe MDL2 Assets" Content=""
Width="50" Height="50" Background="Transparent" Foreground="White">
<TextBlock Foreground="White" FontSize="10" VerticalAlignment="Center" />
</StackPanel>
看起來好像您的xaml缺少一些要完成的信息。另一個問:你說你不想使用radioButton,然後你問如何讓TextBlock和radioButton成爲一個clibale實體。它應該只是第二次提到radioButton的按鈕? – ILOABN
@FabianMiiro道歉我的意思是按鈕和文本塊。我想要一個textblovk和按鈕一個單一的可點擊的實體使用列表視圖 – shriyanshk