Fix sidebar image scaling

This commit is contained in:
Megalon 2020-02-18 15:27:57 -08:00
parent d121c02336
commit 4ca4e53890
7 changed files with 6 additions and 10 deletions

View file

@ -216,7 +216,7 @@ namespace ModAssistant
sidebar = new BitmapImage(new Uri(Path.Combine(location, name + ".side.png")));
}
MainWindow.Instance.BackgroundImage.ImageSource = background;
MainWindow.Instance.SideImage.ImageSource = sidebar;
MainWindow.Instance.SideImage.Source = sidebar;
}
/// <summary>

View file

@ -15,11 +15,7 @@
<ImageBrush x:Name="BackgroundImage" Stretch="{DynamicResource BackgroundImageStretch}"/>
</Rectangle.Fill>
</Rectangle>
<Rectangle>
<Rectangle.Fill>
<ImageBrush x:Name="SideImage" Stretch="None" AlignmentX="Left" AlignmentY="{DynamicResource SideImageYPosition}"/>
</Rectangle.Fill>
</Rectangle>
<Image x:Name="SideImage" UseLayoutRounding="True" SnapsToDevicePixels="True" HorizontalAlignment="Left" VerticalAlignment="{DynamicResource SideImageYPosition}" Width="1272" Height="689" Stretch="Fill"/>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -75,6 +75,6 @@
<!--Background and Side image settings.-->
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
<AlignmentY x:Key="SideImageYPosition">Bottom</AlignmentY> <!-- Bottom, Center, Top -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top -->
</ResourceDictionary>

View file

@ -63,6 +63,6 @@
<!-- Background and Side image settings. -->
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
<AlignmentY x:Key="SideImageYPosition">Bottom</AlignmentY> <!-- Bottom, Center, Top -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top -->
</ResourceDictionary>

View file

@ -74,6 +74,6 @@
<!--Background and Side image settings.-->
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
<AlignmentY x:Key="SideImageYPosition">Bottom</AlignmentY> <!-- Bottom, Center, Top -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top -->
</ResourceDictionary>

View file

@ -90,6 +90,6 @@
<SolidColorBrush x:Key="OptionsIconColor" Color="{DynamicResource ResourceKey=StandardIcon}"/>
<Stretch x:Key="BackgroundImageStretch">UniformToFill</Stretch> <!-- Fill, None, Uniform, UniformToFill -->
<AlignmentY x:Key="SideImageYPosition">Bottom</AlignmentY> <!-- Bottom, Center, Top -->
<VerticalAlignment x:Key="SideImageYPosition">Bottom</VerticalAlignment> <!-- Bottom, Center, Top -->
</ResourceDictionary>