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

プロパティ値

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 文法に準拠しています。

適用対象