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.
63 lines
2.4 KiB
63 lines
2.4 KiB
<Styles |
|
xmlns="https://github.com/avaloniaui" |
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
xmlns:mocks="using:StabilityMatrix.Avalonia.DesignData" |
|
xmlns:controls="using:StabilityMatrix.Avalonia.Controls" |
|
x:DataType="controls:AdvancedImageBox"> |
|
|
|
<Design.PreviewWith> |
|
<Panel Width="600" Height="800"> |
|
<controls:AdvancedImageBox |
|
Source="https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/fb99d197-2c3d-49d2-ba21-d7aa7dbc46d1/width=2000"/> |
|
</Panel> |
|
</Design.PreviewWith> |
|
|
|
<Style Selector="controls|AdvancedImageBox"> |
|
<!-- Set Defaults --> |
|
<Setter Property="Focusable" Value="True"/> |
|
<Setter Property="HorizontalAlignment" Value="Stretch"/> |
|
<Setter Property="VerticalAlignment" Value="Stretch"/> |
|
<Setter Property="Template"> |
|
<ControlTemplate> |
|
<Grid |
|
ColumnDefinitions="*,Auto" |
|
RowDefinitions="*,Auto" |
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}" |
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"> |
|
|
|
<ContentPresenter |
|
Name="ViewPort" |
|
Grid.Row="0" |
|
Grid.Column="0" |
|
Background="Transparent" /> |
|
|
|
<ScrollBar |
|
Name="VerticalScrollBar" |
|
Grid.Row="0" |
|
Grid.Column="1" |
|
Maximum="0" |
|
Minimum="0" |
|
Orientation="Vertical" |
|
ViewportSize="{Binding ElementName=ViewPort, Path=Bounds.Height}" |
|
Visibility="Auto" /> |
|
|
|
<ScrollBar |
|
Name="HorizontalScrollBar" |
|
Grid.Row="1" |
|
Grid.Column="0" |
|
Maximum="0" |
|
Minimum="0" |
|
Orientation="Horizontal" |
|
ViewportSize="{Binding ElementName=ViewPort, Path=Bounds.Width}" |
|
Visibility="Auto" /> |
|
|
|
<!--<Border |
|
Grid.Row="1" |
|
Grid.Column="1" |
|
Background="{DynamicResource ThemeBackgroundColor}" />--> |
|
|
|
</Grid> |
|
</ControlTemplate> |
|
</Setter> |
|
</Style> |
|
</Styles>
|
|
|