0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ツールバーに追加されたボタンのスタイル(ToolBarButtonStyle)を明示的に設定する方法

Posted at

はじめに

本記事はWPFでツールバーに追加したボタンに自動的に設定されるスタイル(ToolBarButtonStyle)を明示的に設定する方法をまとめます。

設定方法

ツールバーに追加したボタンにはToolBarButtonStyleが自動的に設定されます。以下のようなスタイルをボタンに設定することでToolBarButtonStyleを明示的に設定できます。

<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"/>

詳細はこちらの記事を参考にしてください。

まとめ

ツールバーに追加したボタンに自動的に設定されるToolBarButtonStyleは明示的に設定ができる。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?