SHARE
TWEET

Untitled

a guest Feb 21st, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <ControlTemplate x:Key="HorizontalScrollBar"
  2.         TargetType="{x:Type ScrollBar}">
  3.         <Grid >
  4.             <Grid.ColumnDefinitions>
  5.                 <ColumnDefinition MaxWidth="18"/>
  6.                 <ColumnDefinition Width="0.00001*"/>
  7.                 <ColumnDefinition MaxWidth="18"/>
  8.             </Grid.ColumnDefinitions>
  9.             <Border
  10.                 Grid.ColumnSpan="3"
  11.                 CornerRadius="2"
  12.                 Background="Transparent"   />
  13.             <RepeatButton
  14.                 Grid.Column="0"                          
  15.                 Style="{StaticResource ScrollBarLineButton}"
  16.                 Width="18"
  17.                 Command="ScrollBar.LineLeftCommand"
  18.                 Content="M 4 0 L 4 8 L 0 4 Z" />
  19.             <Track
  20.                 Name="PART_Track"
  21.                 Grid.Column="1"
  22.                 IsDirectionReversed="False">
  23.                 <Track.DecreaseRepeatButton>
  24.                     <RepeatButton
  25.                         Style="{StaticResource ScrollBarPageButton}"
  26.                         Command="ScrollBar.PageLeftCommand" />
  27.                 </Track.DecreaseRepeatButton>
  28.                 <Track.Thumb>
  29.                     <Thumb
  30.                         Style="{StaticResource ScrollBarThumb}"
  31.                         Margin="0,1,0,1"  
  32.                         Background="{DynamicResource NormalBrush}"
  33.                         BorderBrush="{DynamicResource NormalBorderBrush}" />
  34.                 </Track.Thumb>
  35.                 <Track.IncreaseRepeatButton>
  36.                     <RepeatButton
  37.                         Style="{StaticResource ScrollBarPageButton}"
  38.                         Command="ScrollBar.PageRightCommand" />
  39.                 </Track.IncreaseRepeatButton>
  40.             </Track>
  41.             <RepeatButton
  42.                 Grid.Column="3"
  43.                 Style="{StaticResource ScrollBarLineButton}"
  44.                 Width="18"
  45.                 Command="ScrollBar.LineRightCommand"
  46.                 Content="M 0 0 L 4 4 L 0 8 Z"/>
  47.         </Grid>
  48.     </ControlTemplate>
  49.    
  50. <Style TargetType="{x:Type ScrollViewer}">
  51.     <Setter Property="Template">
  52.         <Setter.Value>
  53.             <ControlTemplate TargetType="{x:Type ScrollViewer}">
  54.                 <Grid>
  55.                     <Grid.ColumnDefinitions>
  56.                         <ColumnDefinition/>
  57.                         <ColumnDefinition Width="Auto"/>
  58.                     </Grid.ColumnDefinitions>
  59.                     <Grid.RowDefinitions>
  60.                         <RowDefinition/>
  61.                         <RowDefinition Height="Auto"/>
  62.                     </Grid.RowDefinitions>
  63.                     <ScrollContentPresenter Grid.Column="0" />
  64.                     <ScrollBar x:Name="PART_VerticalScrollBar" Grid.Row="0" Grid.Column="1" Value="{TemplateBinding VerticalOffset}" Maximum="{TemplateBinding ScrollableHeight}" ViewportSize="{TemplateBinding ViewportHeight}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
  65.                     <ScrollBar x:Name="PART_HorizontalScrollBar" Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Value="{TemplateBinding HorizontalOffset}" Maximum="{TemplateBinding ScrollableWidth}" ViewportSize="{TemplateBinding ViewportWidth}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
  66.                     <!--<Rectangle Grid.Row="1" Grid.Column="1" Fill="Red"/>-->
  67.                 </Grid>
  68.             </ControlTemplate>
  69.         </Setter.Value>
  70.     </Setter>
  71. </Style>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top