Difference between TargetType=“controlType” and TargetType=“{x:Type controlType}”

前端 未结 3 696
忘掉有多难
忘掉有多难 2020-12-03 13:22

In WPF you can set the TargetType to either the name of the type or you can set it to {x:Type nameOfType}.

Does anyone know what the differ

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-03 13:57

    Apart from the real difference described above, using {x:Type NameOfType} obviously will be highlighted differently in your IDE and makes it stand out and spot right away (as opposed to a regular string). So this is my personal preference.

提交回复
热议问题