ここから、WpfToolkitIntegerUpDown
コントロールの暗黙的なカスタム スタイルを作成できるようです。
<Style TargetType="xctk:IntegerUpDown"
BasedOn="{StaticResource {x:Type xctk:IntegerUpDown}}">
ただし、WpfToolkit のカスタムの暗黙的なスタイルを作成できないようですWatermarkTextBox
。私はこれを試しましたが、コンパイルされません:
<ResourceDictionary xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" ...>
<Style TargetType="xctk:WatermarkTextBox"
BasedOn="{StaticResource {x:Type xctk:WatermarkTextBox}}">...</Style>
エラーが発生します:
テキスト「xctk:WatermarkTextBox」から「TargetType」を作成できませんでした
また試しました:
<Style TargetType="{x:Type Control}" BasedOn="{StaticResource BaseStyle}" x:Key="WatermarkBaseStyle">
<Setter Property="FontSize" Value="24" />
</Style>
<Style TargetType="{x:Type xctk:WatermarkTextBox}" BasedOn="{StaticResource WatermarkBaseStyle}"/>
エラーが発生します:
「テキスト「xctk:WatermarkTextBox」から「タイプ」を作成できませんでした。