ComponentResourceKey.TypeInTargetAssembly 속성

정의

리소스 키를 정의하는 Type을 가져오거나 설정합니다.

public:
 property Type ^ TypeInTargetAssembly { Type ^ get(); void set(Type ^ value); };
public Type TypeInTargetAssembly { get; set; }
member this.TypeInTargetAssembly : Type with get, set
Public Property TypeInTargetAssembly As Type

속성 값

Type

리소스 키를 정의하는 형식입니다.

예제

다음 예제에서는 정의 하는 방법을 보여 줍니다를 ComponentResourceKey 포함 하 여 TypeInTargetAssemblyResourceId 를 사용 하는 ComponentResourceKey 태그 확장합니다. 이 리소스 다음 외부 어셈블리에 배치 하 고 액세스할 수는 비슷한를 사용 하 여 리소스를 요청 하는 키 사용 하 여 ComponentResourceKey 요청에서 합니다.

<Style 
    x:Key="{ComponentResourceKey 
        TypeInTargetAssembly={x:Type local:ColorPicker},
        ResourceId=ColorSliderStyle}"
    TargetType="{x:Type Slider}">

    <Setter Property="Minimum" Value="0"/>
    <Setter Property="Maximum" Value="255"/>
    <Setter Property="SmallChange" Value="1"/>
    <Setter Property="LargeChange" Value="51"/>
    <Setter Property="IsMoveToPointEnabled" Value="true"/>
    <Setter Property="Orientation" Value="Horizontal"/>
</Style>

설명

XAML 정보는 ComponentResourceKey 태그 확장을 참조하세요.

ComponentResourceKey 요소 사용자 지정 구성 요소 형식이 포함 된 어셈블리를 대상 지정을 기반으로 외부 어셈블리에서 액세스할 수 있는 리소스에 대 한 키 정의에 사용 됩니다. 사용자 지정 구성 요소는 종종 리소스 위치한 어셈블리에 있어야 하는 새 형식을 정의 합니다. 일반적으로 이러한 형식은 다른 구현이 없는, 형식을 조회 요구 사항을 충족 하기 위해 존재는 ComponentResourceKey합니다.

적용 대상