WPF の different wording of Style TargetType

First, the wording implicitly

<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="28"/>
</Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="28"/>
</Style>

Second, the wording of the display

<Style x:Key="cc" TargetType="{x:Type TextBlock}">
      <Setter Property="FontSize" Value="28"/>
</Style>

Third, the application automatically written

<Style x:Key="{x:Type TextBlock}" TargetType="TextBlock">
   <Setter Property="FontSize" Value="28"/>
</Style>

Fourth, internal written (written in-house. "" Division)

<Style x:Key="aa">
  <Setter Property="Control.FontSize" Value="28"/>
</Style>

 

Guess you like

Origin www.cnblogs.com/xietianjiao/p/11077223.html