How to create SplashScreen from an uploaded image file, not a project resource

How would you inherit from System.Windows.SplashScreen, this class should enrich this class with the ability to create itself when loading an image on a specific path.

By definition, System.Windows.SplashScreen offers only these two constructors:

public SplashScreen(string resourceName);
public SplashScreen(Assembly resourceAssembly, string resourceName);

As I still feel awkward with WPF, I don’t have a single idea where to start the modifications?

Or do I need to completely change my own SplashScreen class?

+5
source share
3 answers

, . ( ) , SplashScreen

MSDN , WPF SplashScreen , WinForm (, ).

0

, , Assembly.Load() ?

Mono.Cecil

0

splashscreen :

public partial class Splashscreen:Window
{
 static Splashscreen splashscreen;
    public Splashscreen()
    {
        InitializeComponent();
    }

    public static void ShowSplashScreen()
    {
        splashscreen = new Splashscreen();
        splashscreen.Show();
    }

    public static Splashscreen SplashScreen { get { return splashscreen; } set { splashscreen = value; } }

, xaml, , , , ..

read app.config to get client information and show it according to user.

call splashscreen.showsplashscreen () on the first line of your void main () or in your application. once the application is fully loaded, destroy splashscreen by calling splashscreen.splashscreen.close () on either sync or async.

-1
source