csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
2.8 KiB
47 lines
2.8 KiB
<Style xmlns="https://github.com/avaloniaui" Selector="ScrollViewer">
|
|
<Setter Property="Background"
|
|
Value="Transparent" />
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<Grid ColumnDefinitions="*,Auto" RowDefinitions="*,Auto">
|
|
<ScrollContentPresenter Name="PART_ContentPresenter"
|
|
Background="{TemplateBinding Background}"
|
|
CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}"
|
|
CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}"
|
|
Content="{TemplateBinding Content}"
|
|
Extent="{TemplateBinding Extent, Mode=TwoWay}"
|
|
Margin="{TemplateBinding Padding}"
|
|
Offset="{TemplateBinding Offset, Mode=TwoWay}"
|
|
Viewport="{TemplateBinding Viewport, Mode=TwoWay}">
|
|
<ScrollContentPresenter.GestureRecognizers>
|
|
<ScrollGestureRecognizer
|
|
CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}"
|
|
CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}"
|
|
/>
|
|
</ScrollContentPresenter.GestureRecognizers>
|
|
</ScrollContentPresenter>
|
|
<ScrollBar Name="horizontalScrollBar"
|
|
Orientation="Horizontal"
|
|
LargeChange="{Binding LargeChange.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
|
SmallChange="{Binding SmallChange.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Maximum="{TemplateBinding HorizontalScrollBarMaximum}"
|
|
Value="{TemplateBinding HorizontalScrollBarValue, Mode=TwoWay}"
|
|
ViewportSize="{TemplateBinding HorizontalScrollBarViewportSize}"
|
|
Visibility="{TemplateBinding HorizontalScrollBarVisibility}"
|
|
Grid.Row="1"
|
|
Focusable="False"/>
|
|
<ScrollBar Name="verticalScrollBar"
|
|
Orientation="Vertical"
|
|
LargeChange="{Binding LargeChange.Height, RelativeSource={RelativeSource TemplatedParent}}"
|
|
SmallChange="{Binding SmallChange.Height, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Maximum="{TemplateBinding VerticalScrollBarMaximum}"
|
|
Value="{TemplateBinding VerticalScrollBarValue, Mode=TwoWay}"
|
|
ViewportSize="{TemplateBinding VerticalScrollBarViewportSize}"
|
|
Visibility="{TemplateBinding VerticalScrollBarVisibility}"
|
|
Grid.Column="1"
|
|
Focusable="False"/>
|
|
<Panel Grid.Row="1" Grid.Column="1" Background="{DynamicResource ThemeControlMidBrush}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
</Style>
|
|
|