Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<Page.Resources>
<Style x:Key="Gauge" TargetType="controls:Gauge">
<Setter Property="FontFamily" Value="Segoe WP" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:Gauge">
<Viewbox>
<Grid x:Name="Container"
Width="200"
Height="200"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Path Name="PART_Scale"
Fill="Red"
Stroke="{TemplateBinding ScaleBrush}"
StrokeThickness="{TemplateBinding ScaleWidth}" />
<Path Name="PART_Trail"
Stroke="{TemplateBinding TrailBrush}"
StrokeThickness="{TemplateBinding ScaleWidth}" />
<StackPanel HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock Name="PART_ValueText"
Margin="0 0 0 2"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
Foreground="White"
Text="{TemplateBinding Value}"
TextAlignment="Center" />
<TextBlock Margin="0 0 0 2"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
Foreground="White"
Text=" %"
TextAlignment="Center" />
</StackPanel>
<TextBlock FontSize="18"
Text="Profile"
TextAlignment="Center" />
<TextBlock FontSize="18"
Text="Strength"
TextAlignment="Center" />
</StackPanel>
</Grid>
</Viewbox>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Page.Resources>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.