【发布时间】:2012-12-22 13:31:34
【问题描述】:
我是 WPF 开发的新手,我无法找到关于如何实现看起来像这样的自定义边框/面板(或下拉菜单)的决定性答案:
这个想法是制作一个下拉菜单/面板(带有中心箭头)
【问题讨论】:
标签: wpf drop-down-menu menu
我是 WPF 开发的新手,我无法找到关于如何实现看起来像这样的自定义边框/面板(或下拉菜单)的决定性答案:
这个想法是制作一个下拉菜单/面板(带有中心箭头)
【问题讨论】:
标签: wpf drop-down-menu menu
这应该为您指明正确的方向:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="24"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="24" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Polygon
Fill="LightGray"
Grid.Column="1">
<Polygon.Points>
<Point X="12" Y="0" />
<Point X="0" Y="24" />
<Point X="24" Y="24" />
</Polygon.Points>
</Polygon>
<ListBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" />
</Grid>
当然,您可以根据需要对其进行自定义... 请注意,在此示例中,我将顶部中间单元格的高度和宽度设置为使箭头为 24X24
【讨论】: