Fix SplashScreen loading

This commit is contained in:
PAL\cbo
2023-02-07 15:06:43 +01:00
parent b2220452b2
commit 98c3aeb9ea
5 changed files with 38 additions and 17 deletions
+3
View File
@@ -6,6 +6,7 @@ using Serilog;
using Serilog.Sinks.Graylog; using Serilog.Sinks.Graylog;
using DevExpress.Mvvm; using DevExpress.Mvvm;
using DevExpress.Xpf.Core; using DevExpress.Xpf.Core;
using System.Threading;
namespace wpf_ax_utility namespace wpf_ax_utility
{ {
@@ -70,6 +71,8 @@ namespace wpf_ax_utility
uriString = "/wpf_ax_utility;component/AppMainWindow.xaml"; uriString = "/wpf_ax_utility;component/AppMainWindow.xaml";
} }
Thread.Sleep(2000);
this.StartupUri = new Uri(uriString, UriKind.Relative); this.StartupUri = new Uri(uriString, UriKind.Relative);
} }
} }
+31 -17
View File
@@ -6,28 +6,42 @@
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxt="http://schemas.devexpress.com/winfx/2008/xaml/core/themekeys" xmlns:dxt="http://schemas.devexpress.com/winfx/2008/xaml/core/themekeys"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
MinWidth="600" MinWidth="550"
MinHeight="400" MinHeight="300"
AllowAcrylic="True" ResizeMode="NoResize"
dx:DXDesignTimeHelper.Background="#02188f" WindowStyle="None"
WindowStartupLocation="CenterScreen"
AllowsTransparency="True"
Background="Transparent"
Title="PAL Ax Utility"
mc:Ignorable="d" mc:Ignorable="d"
d:DataContext="{x:Static dxmvvm:DXSplashScreenViewModel.DesignTimeData}"> d:DataContext="{x:Static dxmvvm:DXSplashScreenViewModel.DesignTimeData}">
<Grid> <Grid>
<Grid.RowDefinitions> <Border Background="#02188f" CornerRadius="15" Opacity="0.95"/>
<RowDefinition/>
<RowDefinition/> <Grid>
<RowDefinition Height="2*"/> <Grid.RowDefinitions>
</Grid.RowDefinitions> <RowDefinition/>
<RowDefinition Height="2*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<dx:DXImage x:Name="PART_Logo" Height="35" Width="82" Source="res/pallogo.png" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=LogoImageStyle}}" Stretch="Fill"/> <dx:DXImage x:Name="PART_Logo" Height="45" Width="105" Source="res/pallogo.png" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=LogoImageStyle}}" Stretch="Fill"/>
<TextBlock x:Name="PART_Title" Grid.Row="1" Text="PAL Ax Utility" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=TitleTextBoxStyle}}"/> <Border Grid.Row="1" Height="100" Width="100" CornerRadius="15">
<StackPanel Orientation="Vertical" Grid.Row="2" VerticalAlignment="Top"> <Border.Background>
<!--<TextBlock x:Name="PART_SubTitle" Text="{Binding Subtitle}" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=SubTitleTextBoxStyle}}"/>--> <ImageBrush Stretch="Fill" ImageSource="res/axlogo.png"/>
<ProgressBar IsIndeterminate="{Binding IsIndeterminate}" Value="{Binding Progress}" Grid.Row="2" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=ProgressBarStyle}}"/> </Border.Background>
</StackPanel> </Border>
<TextBlock x:Name="PART_Title" Grid.Row="1" Text="PAL Ax Utility" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=TitleTextBoxStyle}}"/>
<StackPanel Orientation="Vertical" Grid.Row="2" VerticalAlignment="Top">
<!--<TextBlock x:Name="PART_SubTitle" Text="{Binding Subtitle}" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=SubTitleTextBoxStyle}}"/>-->
<ProgressBar IsIndeterminate="{Binding IsIndeterminate}" Value="{Binding Progress}" Grid.Row="2" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=ProgressBarStyle}}"/>
</StackPanel>
<TextBlock x:Name="PART_Copyright" Text='Copyright © 2023 PAL s.r.l. All rights reserved.' Grid.Row="2" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=CopyrightTextBoxStyle}}"/> <TextBlock x:Name="PART_Copyright" Text='Copyright © 2023 PAL s.r.l. All rights reserved.' Grid.Row="2" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=CopyrightTextBoxStyle}}"/>
<TextBlock x:Name="PART_Status" Text="{Binding Status}" Grid.Row="2" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=StatusTextBoxStyle}}"/> <TextBlock x:Name="PART_Status" Text="{Binding Status}" Grid.Row="2" Style="{DynamicResource ResourceKey={dxt:FluentSplashScreenThemeKey ResourceKey=StatusTextBoxStyle}}"/>
</Grid>
</Grid> </Grid>
</dx:SplashScreenWindow> </dx:SplashScreenWindow>
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 139 KiB

+4
View File
@@ -12,6 +12,7 @@
<None Remove="axlogo.ico" /> <None Remove="axlogo.ico" />
<None Remove="axlogo.png" /> <None Remove="axlogo.png" />
<None Remove="rdrect1197.png" /> <None Remove="rdrect1197.png" />
<None Remove="res\axlogo.png" />
<None Remove="res\pallogo.png" /> <None Remove="res\pallogo.png" />
</ItemGroup> </ItemGroup>
@@ -19,6 +20,9 @@
<Content Include="res\axlogo.ico"> <Content Include="res\axlogo.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Include="res\axlogo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="res\pallogo.png"> <Content Include="res\pallogo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>