有人知道如何在导航面板(使用xaml)中制作一个带有潜文字和图片的大按钮吗?就像在Windows 11设置应用程序中。
发布于 2022-05-14 20:09:51
您可以使用自定义按钮的内容,使用宽度属性自定义宽度。
由于按钮只能有一段内容,所以最好将所需的所有内容都放在StackPanel或Grid中。
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button x:Name="BigButton" Width="300">
<Button.Content>
<Grid ColumnDefinitions="1*,3*">
<Image Source="WHERE YOU IMAGE IS"/>
<StackPanel Orientation="Vertical"
Grid.Column="1">
<TextBlock FontWeight="Bold" Text="Joe Wood"/>
<TextBlock Text="Managing Director"/>
</StackPanel>
</Grid>
</Button.Content></Button>https://stackoverflow.com/questions/72234248
复制相似问题