<Page
    x:Class="GaugeSamples.Knob"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:GaugeSamples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:c1="using:C1.Xaml.Gauge"
    mc:Ignorable="d"
    >
    
    <Grid>
        <!-- C1Knob -->
        <c1:C1Knob x:Name="knob" Height="400" Width="400" 
            BorderBrush="#BEBEBE" BorderThickness="2" Background="#F5F5F5" PointerFill="#F6AAC9"
            Minimum="0" Maximum="100" Foreground="#888888"
            SweepAngle="270" InteractionMode="ClickOrDrag" FaceVisibility="Collapsed">
            <c1:C1GaugeMark Interval="20" />
            <c1:C1GaugeMark Interval="10" />
            <c1:C1GaugeMark Interval="1" />
            <c1:C1GaugeLabel Interval="20" Alignment="Out" AlignmentOffset="10"/>
        </c1:C1Knob>
        <VisualStateManager.VisualStateGroups>
            <!-- Visual states reflect the application's window size -->
            <VisualStateGroup>
                <VisualState x:Name="WideLayout">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="540" />
                    </VisualState.StateTriggers>
                </VisualState>
                <!-- Visual states reflect the Windows Phone Wide window size -->
                <VisualState x:Name="MiddleLayout">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="480" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="knob.Height" Value="220" />
                        <Setter Target="knob.Width" Value="220" />
                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="NarrowLayout">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="0" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="knob.Height" Value="300" />
                        <Setter Target="knob.Width" Value="300" />
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</Page>
