ResolutionGroupNameAttribute(String) Costruttore

Definizione

Crea un nuovo ResolutionGroupNameAttribute oggetto con il nome specificato.

public:
 ResolutionGroupNameAttribute(System::String ^ name);
public ResolutionGroupNameAttribute(string name);
new Microsoft.Maui.Controls.ResolutionGroupNameAttribute : string -> Microsoft.Maui.Controls.ResolutionGroupNameAttribute
Public Sub New (name As String)

Parametri

name
String

Un nome, ad esempio il nome di una società o l'URL della società invertito, che consente di identificare in modo univoco gli effetti.

Commenti

Gli sviluppatori devono fornire un nome a ExportEffectAttribute che sia univoco nell'ambito dell'oggetto name fornito a ResolutionGroupNameAttribute. Il Resolve(String) metodo accetta una stringa che rappresenta la concatenazione di (nome del gruppo di name risoluzione), '.'e il nome univoco fornito a ExportEffectAttributee restituisce l'effetto specificato.

Ad esempio, con le dichiarazioni:

[assembly: ResolutionGroupName ("com.YourCompany")]
[assembly: ExportEffect (typeof (ShadowEffect), "ShadowEffect")]

Il codice seguente aggiungerà quindi l'effetto a un pulsante:

        [var button = new Button { Text = "I have a shadow" };
button.Effects.Add (Effect.Resolve ("com.YourCompany.ShadowEffect"));

Si applica a

Vedi anche