开发者

WPF Radio button does not show in toolbar

开发者 https://www.devze.com 2022-12-31 15:55 出处:网络
Is there any way to force a radio button or check box to show properly in a toolbar?The ci开发者_Go百科rcle/check box always disappears once its placed inside a toolbar. By default, WPF overrides Radi

Is there any way to force a radio button or check box to show properly in a toolbar? The ci开发者_Go百科rcle/check box always disappears once its placed inside a toolbar.


By default, WPF overrides RadioButtons to make them look like toggle buttons. To eliminate this, place a panel inside the ToolBar and then put your RadioButton(s) in there.

<ToolBar>
   <StackPanel>
      <RadioButton Content="Radio Button" />
   </StackPanel>
</ToolBar>
0

精彩评论

暂无评论...
验证码 换一张
取 消