Skip to content

Instantly share code, notes, and snippets.

@natelowry
Last active December 22, 2015 18:59
Show Gist options
  • Save natelowry/6516693 to your computer and use it in GitHub Desktop.
Save natelowry/6516693 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace DynamicSplashScreen
{
/// <summary>
/// Interaction logic for SplashScreenWindow.xaml
/// </summary>
public partial class AnimatedSplashScreenWindow : Window, ISplashScreen
{
public AnimatedSplashScreenWindow()
{
InitializeComponent();
}
public void AddMessage(string message)
{
Dispatcher.Invoke((Action)delegate()
{
this.UpdateMessageTextBox.Text = message;
});
}
public void LoadComplete()
{
Dispatcher.InvokeShutdown();
}
}
public interface ISplashScreen
{
void AddMessage(string message);
void LoadComplete();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment