I just wish to make a little splash screen with loading text. But what I get is a white screen that launches when the code finishes, why is that?
Code:
public partial class SplashScreen : Page
{
public SplashScreen()
{
InitializeComponent();
}
private void Page_Loaded(object sender, RoutedEventArgs e)
{
Loading.Content = "Loading";
Thread.Sleep(500);
Loading.Content = "Loading.";
Thread.Sleep(500);
Loading.Content = "Loading..";
Thread.Sleep(500);
Loading.Content = "Loading...";
Thread.Sleep(500);
//when gets to here the page can be seen, not with loading... "animation:
}
}
XAML:
<Viewbox>
<Grid>
<Image x:Name="Overview_Picture" Source="/WPF_Unity;component/Images/Splash.jpg" />
<Label HorizontalAlignment="Center" x:Name="Loading" FontSize="54" Content="Loading..." Foreground="#a09c9d" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Bottom" FontFamily="pack://application:,,,/Fonts/#Univers LT Std 57 Cn" FontWeight="Bold" Margin="0,0,0,400" />
</Grid>
</Viewbox>