Change default FieldModifier for XAML,WPF
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.
精彩评论