ExportEffectAttribute(Type, String) 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
새 ExportEffectAttribute를 만듭니다.
public ExportEffectAttribute (Type effectType, string uniqueName);
new Xamarin.Forms.ExportEffectAttribute : Type * string -> Xamarin.Forms.ExportEffectAttribute
매개 변수
- effectType
- System.Type
표시된 Effect의 형식입니다.
- uniqueName
- System.String
Effect의 고유 이름입니다.
설명
개발자는 에 제공된 값의 scope 대해 고유한 를 제공해야 uniqueName
ResolutionGroupNameAttribute합니다. 메서드는 Resolve(String) , ''.
에 제공된 확인 그룹 이름과 에 제공된 ResolutionGroupNameAttribute이름의 연결인 문자열을 ExportEffectAttribute사용하고 형식effectType
이 인 효과를 반환합니다.
예를 들어 선언을 사용하는 경우:
[assembly: ResolutionGroupName ("com.YourCompany")]
[assembly: ExportEffect (typeof (ShadowEffect), "ShadowEffect")]
그런 다음 아래 코드는 단추에 효과를 추가합니다.
var button = new Button { Text = "I have a shadow" };
button.Effects.Add (Effect.Resolve ("com.YourCompany.ShadowEffect"));