Click here to Skip to main content
12,945,401 members (81,594 online)
Click here to Skip to main content
Add your own
alternative version


1 bookmarked
Posted 6 Dec 2012

Non Rectangular simple splash screen WPF

, 6 Dec 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
A WPF sample, edit and make your own splash


Here is a simple XAML created splash screen for Windows application. It is quite good looking and completely editable according to your needs.


In code behind, just adjust the timespan value for how much time you want to show splash.

Using the Code

The grid inside the window uses a path to make its non rectangular shape. The XAML is here:

<Path Stroke="DarkGray" StrokeThickness="5" SnapsToDevicePixels="True">
                   <LinearGradientBrush StartPoint="0.2,0" EndPoint="0.8,1" >
                           <GradientStop Color="White"  Offset="0"></GradientStop>
                           <GradientStop Color="SkyBlue"  Offset="0.45"></GradientStop>
                           <GradientStop Color="White" Offset="0.8"></GradientStop>
                           <GradientStop Color="Gray" Offset="1"></GradientStop>
                           <PathFigure StartPoint="0,0" IsClosed="True">
                               <LineSegment Point="405,0"></LineSegment>
                               <LineSegment Point="600,175"></LineSegment>
                               <LineSegment Point="400,270"></LineSegment>
                               <LineSegment Point="90,270"></LineSegment>
                               <LineSegment Point="0,170"></LineSegment>
                   <ScaleTransform ScaleX="1.3" ScaleY="1.3"></ScaleTransform>


In code behind:

private void Window_Loaded(object sender, RoutedEventArgs e)
           DispatcherTimer dispatcherTimer = new DispatcherTimer();
           dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
           dispatcherTimer.Interval = new TimeSpan(0, 0, 8);


       private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
           Closing -= Window_Closing;
           e.Cancel = true;
           var anim = new DoubleAnimation(0, (Duration)TimeSpan.FromSeconds(1));
           anim.Completed += (s, _) => this.Close();
           this.BeginAnimation(UIElement.OpacityProperty, anim);

       private void dispatcherTimer_Tick(object sender, EventArgs e)



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer
India India
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralMy vote of 2 Pin
BadassAlien9-Dec-12 10:43
memberBadassAlien9-Dec-12 10:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170518.1 | Last Updated 6 Dec 2012
Article Copyright 2012 by choudhary.sumit
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid