ComponentResourceKey.ResourceId 속성

정의

이 키와 이 형식과 연결된 다른 키를 구분하는 고유 식별자를 가져오거나 설정합니다.

public:
 property System::Object ^ ResourceId { System::Object ^ get(); void set(System::Object ^ value); };
public object ResourceId { get; set; }
member this.ResourceId : obj with get, set
Public Property ResourceId As Object

속성 값

고유 식별자입니다. 일반적으로 문자열입니다.

예제

다음 예제에서는 이 키를 사용하여 ResourceId 이 형식과 연결된 다른 키와 구분하는 방법을 보여 있습니다.

<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 태그 확장을 참조하세요.

일반적으로 값에 ResourceId 사용되는 문자열은 XamlName 문법을 준수합니다.

적용 대상