Događaji
Izgradite inteligentne aplikacije
M03 17 23 - M03 21 23
Pridružite se seriji susreta kako biste sa kolegama programerima i stručnjacima izgradili skalabilna AI rješenja zasnovana na stvarnim slučajevima korištenja.
Registrirajte seOvaj preglednik više nije podržan.
Nadogradite na Microsoft Edge da iskoristite najnovije osobine, sigurnosna ažuriranja i tehničku podršku.
The .NET Multi-platform App UI (.NET MAUI) x:FieldModifier
attribute specifies the access level for generated fields for named XAML elements.
Valid values of the x:FieldModifier
attribute are:
Private
– specifies that the generated field for the XAML element is accessible only within the body of the class in which it is declared.Public
– specifies that the generated field for the XAML element has no access restrictions.Protected
– specifies that the generated field for the XAML element is accessible within its class and by derived class instances.Internal
– specifies that the generated field for the XAML element is accessible only within types in the same assembly.NotPublic
– identical to Internal
.By default, if the value of the attribute isn't set, the generated field for the element will be private
.
Bilješka
The value of the attribute can use any casing, as it will be converted to lowercase by .NET MAUI.
The following conditions must be met for an x:FieldModifier
attribute to be processed:
x:Class
.x:Name
specified.The following XAML shows examples of setting the attribute:
<Label x:Name="privateLabel" />
<Label x:Name="internalLabel" x:FieldModifier="NotPublic" />
<Label x:Name="publicLabel" x:FieldModifier="Public" />
Važno
The x:FieldModifier
attribute cannot be used to specify the access level of a .NET MAUI XAML class. For information about specifying the access level of a .NET MAUI XAML class, see Class modifiers.
.NET MAUI povratne informacije
.NET MAUI je projekat otvorenog koda. Odaberite vezu za pružanje povratnih informacija:
Događaji
Izgradite inteligentne aplikacije
M03 17 23 - M03 21 23
Pridružite se seriji susreta kako biste sa kolegama programerima i stručnjacima izgradili skalabilna AI rješenja zasnovana na stvarnim slučajevima korištenja.
Registrirajte seObučavanje
Modul
Create a UI in a .NET MAUI app by using XAML - Training
Learn how to design a UI for a .NET MAUI app using XAML.
Dokumentacija
.NET MAUI XAML provides support for consuming generic CLR types by specifying the generic constraints as type arguments.
The .NET MAUI x:ClassModifier attribute specifies the access level for generated fields for named XAML elements.
Consume XAML markup extensions - .NET MAUI
.NET MAUI XAML markup extensions enhance the power and flexibility of XAML by allowing element attributes to be set from a variety of sources.