Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Challenging LinearGradientBrush Control

$
0
0

Atleast for me it is challenging...

I want to connect the two sections with arcs and fill them similarly....How to do it in WPF??

XAML:

<Grid x:Name="LayoutRoot"><Grid.RowDefinitions><RowDefinition/><RowDefinition/></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition/><ColumnDefinition/></Grid.ColumnDefinitions><Rectangle Stroke="Black" StrokeThickness="1"><Rectangle.Fill><LinearGradientBrush x:Name="lgBrush1" StartPoint="0,0" EndPoint="0,0.5" SpreadMethod="Reflect"><GradientStop Color="#FF484242" Offset="0"/><GradientStop Color="White" Offset="1" /></LinearGradientBrush></Rectangle.Fill></Rectangle><Rectangle Stroke="Black" StrokeThickness="1" Grid.Row="1" Grid.Column="1"><Rectangle.Fill><LinearGradientBrush x:Name="lgBrush2" StartPoint="0,0" EndPoint="0.5,0" SpreadMethod="Reflect"><GradientStop Color="#FF484242" Offset="0"/><GradientStop Color="White" Offset="1" /></LinearGradientBrush></Rectangle.Fill></Rectangle></Grid>

Thanks


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>