开发者

Change default FieldModifier for XAML,WPF

开发者 https://www.devze.com 2023-04-04 01:42 出处:网络
The default FieldModifier value in WPF when using XAML is \"internal\", unless explicitly stated, e.g.

The default FieldModifier value in WPF when using XAML is "internal", unless explicitly stated, e.g.

<Button x:FieldModifier="private" Name="BackButton" Content="Hello stackoverflow"/>

Is there any way to change this default, so that it is no longer necessary to define x:FieldModifier开发者_JAVA百科 for every single element?


No. It is part of the WPF/XAML specification and implemented in the XAML Parser. It is similar to how private is the default scope within a class and internal within a namespace.

0

精彩评论

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