2015-02-06 220 views
1

非常高的WPF的視覺樹Expander控件是一個邊框元素(請參見截圖)。默認情況下,這有一個CornerRadius3。有沒有可能修改這個值?在WPF Expander控件上更改邊框的圓角半徑?

enter image description here

enter image description here

+1

您可以更改控制模板。 Expander模板在以下鏈接的msdn中可用。 https://msdn.microsoft.com/en-us/library/ms753296(v=vs.110).aspx – 2015-02-06 20:02:54

回答

0

我會離開現在標記爲答案,但我成功地實施解決方案如下:

使用stylesnooper我獲得用於樣式/控制模板「標準'Expander控制。

然後發現它並沒有完全像預期後,計算出該行<ToggleButton IsChecked="False" ...是錯誤的,實際上應該是<ToggleButton IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"...

然後一切按預期工作。