Udostępnij za pośrednictwem


ResolutionGroupNameAttribute Klasa

Definicja

Atrybut, który identyfikuje nazwę grupy, zazwyczaj nazwę firmy lub odwrócony adres URL firmy, który zapewnia zakres nazw efektów.

public ref class ResolutionGroupNameAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly)]
public sealed class ResolutionGroupNameAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly)>]
type ResolutionGroupNameAttribute = class
    inherit Attribute
Public NotInheritable Class ResolutionGroupNameAttribute
Inherits Attribute
Dziedziczenie
ResolutionGroupNameAttribute
Atrybuty

Uwagi

Deweloperzy muszą podać nazwęExportEffectAttribute, która jest unikatowa w zakresie nazwy, którą podaje do .ResolutionGroupNameAttribute Metoda Resolve(String) przyjmuje ciąg, który jest łączeniem nazwy (nazwy grupy rozpoznawania), '.'i unikatowej nazwy, która została dostarczona do ExportEffectAttribute, i zwraca określony efekt.

Na przykład z deklaracjami:

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

Następnie poniższy kod doda efekt do przycisku:

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

Konstruktory

ResolutionGroupNameAttribute(String)

Tworzy nowy atrybut nazwy grupy rozpoznawania.

Dotyczy