我正在使用扩展的WPF工具包。
如何在此DropDownButton中更改标准箭头样式?
<wpfx:DropDownButton
Width="200"
Height="32"
Content="DropDownButton: ClickMe">
<wpfx:DropDownButton.DropDownContent>
<wpfx:WrapPanel Background="Aqua">
<StackPanel Width="100" Height="100">
<Button>Click Me</Button>
</StackPanel>
</wpfx:WrapPanel>
</wpfx:DropDownButton.DropDownContent>
</wpfx:DropDownButton>发布于 2017-07-18 09:55:13
您需要修改(整个)控件模板。您将在这里找到默认的一个:https://github.com/xceedsoftware/wpftoolkit/blob/015d89f201800a275feacf8eccedfd58fb1a59ca/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/DropDownButton/Themes/Generic.xaml
可以将其复制到项目中,并设置DropDownButton的DropDownButton属性。
<wpfx:DropDownButton Width="200" Height="32" Content="DropDownButton: ClickMe">
<wpfx:DropDownButton.DropDownContent>
<wpfx:WrapPanel Background="Aqua">
<StackPanel Width="100" Height="100">
<Button>Click Me</Button>
</StackPanel>
</wpfx:WrapPanel>
</wpfx:DropDownButton.DropDownContent>
<wpfx:DropDownButton.Template>
<!-- add the ControlTemplate here -->
</wpfx:DropDownButton.Template>
</wpfx:DropDownButton>查找模板中有“箭头”的Path。您需要将它的Data属性设置为表示所需箭头的Geometry。
有"Arrow“属性,或者您只需将其设置为某个枚举值或类似的东西。您需要自己定义箭头的外观并修改模板。
https://stackoverflow.com/questions/45163012
复制相似问题