Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Style x:Key="ScrollBarLineButtonStyle" TargetType="{x:Type RepeatButton}">
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <Canvas Height="18">
- <Polygon Fill="LightBlue" Points="3,15 15,15 9,3"></Polygon>
- </Canvas>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ScrollBarLineButtonBottomStyle" TargetType="{x:Type RepeatButton}">
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <Canvas Height="18">
- <Polygon Fill="LightBlue" Points="3,3 9,15 15,3"></Polygon>
- </Canvas>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ScrollBarPageButtonStyle" TargetType="{x:Type RepeatButton}">
- <Setter Property="IsTabStop" Value="False"/>
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <Border BorderBrush="Transparent"></Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ScrollBarThumbStyle" TargetType="{x:Type Thumb}">
- <Setter Property="IsTabStop" Value="False"/>
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="Margin" Value="1,0,1,0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Thumb}">
- <Rectangle Fill="LightBlue" Margin="2"></Rectangle>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition MaxHeight="18"/>
- <RowDefinition Height="*"/>
- <RowDefinition MaxHeight="18"/>
- </Grid.RowDefinitions>
- <RepeatButton Grid.Row="0" Height="18"
- Style="{StaticResource ScrollBarLineButtonStyle}"
- Command="ScrollBar.LineUpCommand" >
- </RepeatButton>
- <Track Name="PART_Track" Grid.Row="1"
- IsDirectionReversed="True">
- <Track.DecreaseRepeatButton>
- <RepeatButton Command="ScrollBar.PageUpCommand" Style="{StaticResource ScrollBarPageButtonStyle}">
- </RepeatButton>
- </Track.DecreaseRepeatButton>
- <Track.Thumb>
- <Thumb Style="{StaticResource ScrollBarThumbStyle}">
- </Thumb>
- </Track.Thumb>
- <Track.IncreaseRepeatButton>
- <RepeatButton Command="ScrollBar.PageDownCommand" Style="{StaticResource ScrollBarPageButtonStyle}">
- </RepeatButton>
- </Track.IncreaseRepeatButton>
- </Track>
- <RepeatButton Grid.Row="3" Height="18"
- Style="{StaticResource ScrollBarLineButtonBottomStyle}"
- Command="ScrollBar.LineDownCommand">
- </RepeatButton>
- </Grid>
- </ControlTemplate>
- <Style TargetType="{x:Type ScrollBar}">
- <Setter Property="Template" Value="{StaticResource VerticalScrollBar}"/>
- </Style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement