Ich möchte gern folgende Eigenschaften eines Rectangle als Styl erstellen:
[code=xml]
<Rectangle DockPanel.Dock="Top" Height="3">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
<GradientStop Color="Gray" Offset="0" />
<GradientStop Color="Black" Offset="1" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
[/code]
Ist so etwas möglich und wenn ja wie. Bisher habe ich das so ähnlich(für Fenster) für andere Elemente gestaltet und dann im Fenstercode aufgerufen:
[code=xml]
<Style x:Key="Fenster_01">
<Setter Property="Control.MinHeight" Value="700"/>
<Setter Property="Control.MinWidth" Value="1000"/>
<Setter Property="Control.Background" Value="black"/>
<Setter Property="Control.FontSize" Value="15"/>
</Style>
[/code]
Allerdings komme ich nicht über dieses hinaus. Ich weiß nicht wie es geht?
[code=xml]
<Rectangle DockPanel.Dock="Top" Height="3">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
<GradientStop Color="Gray" Offset="0" />
<GradientStop Color="Black" Offset="1" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
[/code]
Ist so etwas möglich und wenn ja wie. Bisher habe ich das so ähnlich(für Fenster) für andere Elemente gestaltet und dann im Fenstercode aufgerufen:
[code=xml]
<Style x:Key="Fenster_01">
<Setter Property="Control.MinHeight" Value="700"/>
<Setter Property="Control.MinWidth" Value="1000"/>
<Setter Property="Control.Background" Value="black"/>
<Setter Property="Control.FontSize" Value="15"/>
</Style>
[/code]
Allerdings komme ich nicht über dieses hinaus. Ich weiß nicht wie es geht?