diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/SliderContentControl.xaml')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/SliderContentControl.xaml | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/SliderContentControl.xaml b/Software/Visual_Studio/Tango.Touch/Controls/SliderContentControl.xaml new file mode 100644 index 000000000..9e2b85c60 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/SliderContentControl.xaml @@ -0,0 +1,92 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.Touch.Controls" + > + + <ResourceDictionary.MergedDictionaries> + <ResourceDictionary Source="../Resources/Colors.xaml" /> + </ResourceDictionary.MergedDictionaries> + + <Style x:Key="RepeatButtonTransparent" TargetType="{x:Type RepeatButton}"> + <Setter Property="OverridesDefaultStyle" Value="true"/> + <Setter Property="Background" Value="Transparent"/> + <Setter Property="Focusable" Value="false"/> + <Setter Property="IsTabStop" Value="false"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type RepeatButton}"> + <Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + + <Style x:Key="ThumbSlider" Style.TargetType="{x:Type Thumb}" > + <Setter Setter.Property="SnapsToDevicePixels" Setter.Value="True" /> + <Setter Setter.Property="OverridesDefaultStyle" Setter.Value="True" /> + <Setter Setter.Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type Thumb}"> + <Grid x:Name="grip" HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center"> + <Ellipse HorizontalAlignment="Center" VerticalAlignment="Center" + Height="{Binding ActualWidth, RelativeSource={RelativeSource Self}}" + Width="{Binding ThumbHeight, RelativeSource={RelativeSource AncestorType=local:SliderContentControl}}" > + <Ellipse.Fill> + <SolidColorBrush Color="{Binding ThumbColor, RelativeSource={RelativeSource AncestorType=local:SliderContentControl}}"/> + </Ellipse.Fill> + </Ellipse> + + <!--<Ellipse x:Name="knob" Grid.Column="0" Grid.Row="1" Stroke="{StaticResource TangoGrayBrush}" StrokeThickness="0" Fill="{StaticResource TangoPrimaryAccentBrush}" Opacity="0.5"></Ellipse>--> + <Grid.Effect> + <DropShadowEffect BlurRadius="10" RenderingBias="Quality" ShadowDepth="1" Color="{StaticResource TangoDropShadowColor}"/> + </Grid.Effect> + </Grid> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + + <Style TargetType="{x:Type local:SliderContentControl}"> + <Setter Property="Background" Value="{StaticResource TangoNotificationBarMaskBrush}"/> + + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:SliderContentControl}"> + <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True" CornerRadius="6"> + <Grid> + <!--<ContentPresenter Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}" />--> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="1*" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="1*" /> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*"/> + </Grid.ColumnDefinitions> + <Border x:Name="PART_ColorPickerDisplay" Grid.Row="1" Background="Transparent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" + MinHeight="14" Margin="5 0 0 0" VerticalAlignment="center" CornerRadius="6" > + <ContentPresenter Panel.ZIndex="1" Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}" /> + </Border> + + <Track Track.Name="PART_Track" Grid.Row="0" Margin="0 -2 0 0" VerticalAlignment="Center" Grid.RowSpan="3"> + <!--<Track.DecreaseRepeatButton> + <RepeatButton Style="{StaticResource RepeatButtonTransparent}" /> + </Track.DecreaseRepeatButton> + <Track.IncreaseRepeatButton> + <RepeatButton Style="{StaticResource RepeatButtonTransparent}" /> + </Track.IncreaseRepeatButton>--> + <Track.Thumb> + <Thumb Thumb.Name="PART_Thumb" UIElement.Focusable="False" Height="Auto" Style="{StaticResource ThumbSlider}" VerticalAlignment="Top" Width="Auto" VerticalContentAlignment="Top"/> + </Track.Thumb> + </Track> + </Grid> + </Grid> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + + +</ResourceDictionary>
\ No newline at end of file |
