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

속성 값

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

예제

다음 예제에서는 ComponentResourceKey 포함하여 TypeInTargetAssemblyResourceId 사용하는 방법을 보여 줍니다. 그러면 이 리소스를 외부 어셈블리에 배치하고 요청에서 유사 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.

적용 대상