Aracılığıyla paylaş


MenuItem.SeparatorStyleKey Özellik

Tanım

olduğunda öğesine uygulanan MenuItem stilin MenuItemSeparatorkaynak anahtarını alır.

public:
 static property System::Windows::ResourceKey ^ SeparatorStyleKey { System::Windows::ResourceKey ^ get(); };
public static System.Windows.ResourceKey SeparatorStyleKey { get; }
static member SeparatorStyleKey : System.Windows.ResourceKey
Public Shared ReadOnly Property SeparatorStyleKey As ResourceKey

Özellik Değeri

olduğunda öğesine uygulanan stilin MenuItemMenuItem kaynak anahtarı.Separator

Örnekler

Aşağıdaki örnekte, içinde bir Separator stili için bu özelliğin nasıl kullanılacağı gösterilmektedir Menu.

<Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="Separator">
  <Setter Property="OverridesDefaultStyle" Value="true" />
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="{x:Type Separator}">
        <Border Width="30" Height="4" Margin="4" Background="Red"/>
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>

Açıklamalar

Menüdeki bir Separator öğesinin stilini değiştirmek için bu özelliği kullanın.

XAML Öznitelik Kullanımı

<objectproperty={ MenuItem.SeparatorStyleKey}"/>

Şunlara uygulanır

Ayrıca bkz.