Added set splash screen properties

This commit is contained in:
erri120 2019-10-07 14:40:19 +02:00
parent d72803f37b
commit 522ae4c493
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135
2 changed files with 27 additions and 2 deletions

View File

@ -9,7 +9,21 @@
Style="{StaticResource {x:Type Window}}" Icon="square_transparent_icon.ico" WindowStyle="ToolWindow"
ResizeMode="NoResize"
Closing="Window_Closing">
<Grid>
<Grid Margin="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="450"/>
<ColumnDefinition Width="450"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="289"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<Image Grid.Row="0" Stretch="Uniform" Name="SplashScreenProperty"/>
<Button Grid.Row="1" Height="30" Click="SetSplashScreen_Click" ToolTip="Use a 1400x900 png file for the best results">
<TextBlock Text="Change splash screen image" FontSize="15" FontWeight="Bold"/>
</Button>
</Grid>
</Grid>
</Window>

View File

@ -23,11 +23,22 @@ namespace Wabbajack
public ModlistPropertiesWindow()
{
InitializeComponent();
var bannerImage = UIUtils.BitmapImageFromResource("Wabbajack.banner.png");
SplashScreenProperty.Source = bannerImage;
}
private void Window_Closing(object sender, CancelEventArgs e)
{
//Hide();
}
private void SetSplashScreen_Click(object sender, RoutedEventArgs e)
{
var file = UIUtils.OpenFileDialog("Banner image|*.png");
if(file != null)
{
SplashScreenProperty.Source = new BitmapImage(new Uri(file));
}
}
}
}