Skip to content

Instantly share code, notes, and snippets.

@JerryNixon
Created July 17, 2019 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JerryNixon/751b1f9a4d4d33b8150be4974925df74 to your computer and use it in GitHub Desktop.
Save JerryNixon/751b1f9a4d4d33b8150be4974925df74 to your computer and use it in GitHub Desktop.
<Page
x:Class="UsingRing.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UsingRing"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Width="500" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="500" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<local:RingSegment x:Name="MyRingSegment" Fill="Maroon" Stroke="Green"
StrokeThickness="{Binding ElementName=StrokeThicknessSlider, Path=Value}"
StartAngle="{Binding ElementName=StartAngleSlider, Path=Value}"
EndAngle="{Binding ElementName=EndAngleSlider, Path=Value}"
InnerRadius="{Binding ElementName=InnerRadiusSlider, Path=Value}"
Radius="{Binding ElementName=RadiusSlider, Path=Value}" />
<StackPanel Grid.Row="1">
<Slider x:Name="StartAngleSlider" Header="Start Angle" Minimum="1" Maximum="{Binding ElementName=EndAngleSlider, Path=Value, UpdateSourceTrigger=PropertyChanged}" Value="0" />
<Slider x:Name="EndAngleSlider" Header="End Angle" Minimum="{Binding ElementName=StartAngleSlider, Path=Value, UpdateSourceTrigger=PropertyChanged}" Maximum="360" Value="100" />
<Slider x:Name="RadiusSlider" Header="Radius" Minimum="{Binding ElementName=InnerRadiusSlider, Path=Value, UpdateSourceTrigger=PropertyChanged}" Maximum="250" Value="250" />
<Slider x:Name="InnerRadiusSlider" Header="Inner Radius" Minimum="50" Maximum="{Binding ElementName=RadiusSlider, Path=Value, UpdateSourceTrigger=PropertyChanged}" Value="100" />
<Slider x:Name="StrokeThicknessSlider" Header="Stroke Thickness" Minimum="0" Maximum="10" Value="10" />
</StackPanel>
</Grid>
</Page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment