	  
	   
    
		

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="clr-namespace:C1.WPF" xmlns:ms_wpfonly="http://schemas.microsoft.com/netfx/2007/xaml/presentation" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="ms_wpfonly">
	
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="/C1.WPF.4;component/themes/Common.xaml" />
		<ResourceDictionary Source="/C1.WPF.4;component/themes/C1Button.xaml" />
	</ResourceDictionary.MergedDictionaries>

	<!-- C1ScrollViewer -->
	<Style TargetType="c1:C1ScrollViewer">
		<Setter Property="ScrollMode" Value="Hover" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1:C1ScrollViewer">
					<Grid>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto" />
							<RowDefinition Height="*" />
							<RowDefinition Height="Auto" />
						</Grid.RowDefinitions>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition Width="*" />
							<ColumnDefinition Width="Auto" />
						</Grid.ColumnDefinitions>
						
						<!-- Style-less ScrollViewer :: DON'T MODIFY :: -->
						<ScrollViewer x:Name="ScrollViewer" Grid.RowSpan="3" Grid.ColumnSpan="3">
							<ScrollViewer.Template>
                                <ControlTemplate TargetType="ScrollViewer">
									<ScrollContentPresenter Name="PART_ScrollContentPresenter" />
								</ControlTemplate>
							</ScrollViewer.Template>
							<ContentPresenter />
						</ScrollViewer>

                        <Border Grid.Row="0" Grid.Column="1" Visibility="{Binding CanScrollUp, Converter={StaticResource visibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}">
	   					    <RepeatButton ClickMode="Press" Visibility="{TemplateBinding VerticalScrollBarVisibility}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Command="c1:C1ScrollViewer.MoveUpCommand" Background="{TemplateBinding Background}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding Background}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding Background}" BorderThickness="0" Style="{StaticResource ClearStyleButtonStyle}">
	   						    <Path Height="4" Width="7" Stretch="Fill" Fill="{TemplateBinding Foreground}" Data="M 0 3.5 L 3.5 0 L 7 3.5 Z" />
	   					    </RepeatButton>
                        </Border>

                        <Border Grid.Row="2" Grid.Column="1" Visibility="{Binding CanScrollDown, Converter={StaticResource visibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}">
                            <RepeatButton ClickMode="Press" Visibility="{TemplateBinding VerticalScrollBarVisibility}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Command="c1:C1ScrollViewer.MoveDownCommand" Background="{TemplateBinding Background}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding Background}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding Background}" BorderThickness="0" Style="{StaticResource ClearStyleButtonStyle}">
                                <Path Height="4" Width="7" Stretch="Fill" Fill="{TemplateBinding Foreground}" Data="M 0 0 L 3.5 3.5 L 7 0 Z" />
                            </RepeatButton>
                        </Border>

                        <Border Grid.Row="1" Grid.Column="0" Visibility="{Binding CanScrollLeft, Converter={StaticResource visibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}">
                            <RepeatButton Grid.Row="1" Grid.Column="0" ClickMode="Press" Visibility="{TemplateBinding HorizontalScrollBarVisibility}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Command="c1:C1ScrollViewer.MoveLeftCommand" Background="{TemplateBinding Background}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding Background}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding Background}" BorderThickness="0" Style="{StaticResource ClearStyleButtonStyle}">
                                <Path Height="7" Width="4" Stretch="Fill" Fill="{TemplateBinding Foreground}" Data="M 3.5 0 L 0 3.5 L 3.5 7 Z" />
                            </RepeatButton>
                        </Border>

                        <Border Grid.Row="1" Grid.Column="2" Visibility="{Binding CanScrollRight, Converter={StaticResource visibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}">
                            <RepeatButton Grid.Row="1" Grid.Column="2" ClickMode="Press" Visibility="{TemplateBinding HorizontalScrollBarVisibility}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Command="c1:C1ScrollViewer.MoveRightCommand" Background="{TemplateBinding Background}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding Background}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding Background}" BorderThickness="0" Style="{StaticResource ClearStyleButtonStyle}">
	   						    <Path Height="7" Width="4" Stretch="Fill" Fill="{TemplateBinding Foreground}" Data="M 0 0 L 3.5 3.5 L 0 7 Z" />
	   					    </RepeatButton>
                        </Border>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>
