【发布时间】:2015-10-31 15:58:41
【问题描述】:
我正在创建一个 Windows 10 通用应用程序,并且我已成功创建 shell.xaml,但我不想使用 radioButton 而不是我使用了按钮和 TextBlock。 我想知道如何通过 listView Item 使 TextBlock 和 Button 成为可单击的实体。
<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应该只是按钮吗?
-
@FabianMiiro 道歉我的意思是按钮和文本块。我想要一个 textblovk 并使用 listview 按钮一个可点击的实体
标签: xaml windows-phone windows-10