WPF Expander: Reversing the icon direction while keeping the content location (ExpandDirection) the same

99封情书 提交于 2019-12-06 02:59:48

If I understand correctly that you want to swap arrows for expander collapsed/expanded state, you'll need to create a custom control template for expander. The easiest way I know to do that is to get expander control template from wpf theme and rename styles:

  • ExpanderUpHeaderStyle to ExpanderDownHeaderStyle
  • ExpanderDownHeaderStyle to ExpanderUpHeaderStyle

You can download themes sources from here http://msdn.microsoft.com/en-us/library/aa358533(VS.90).aspx

If you'll have any issues with that, let me know what wpf theme are you using and I'll make you the xaml.

Also have a look how to customize Expander with Blend http://www.c-sharpcorner.com/uploadfile/dpatra/807/default.aspx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!