Greg
Greg

Reputation: 34798

windowless wpf application example?

Any advice or links or sample application (for VS2010) re how to develop a "windowless" WPF application?

That is the ones that look quite modern and don't seem to have the historical window chrome around the edges - they seem to have rounded edges etc...

Upvotes: 2

Views: 2781

Answers (2)

Josh Reuben
Josh Reuben

Reputation: 577

Just remove StartupUri and in the Application Startup method dont load a window:

public partial class App

{

    public static bool IsTrue ;

    public App()
    {
        Startup += AppStartup;
    }


    public void DoWork()
    {
        for (int i = 0; i < 10; i++)
        {
            Thread.Sleep(1000);
            Trace.WriteLine("blah");
        }
        IsTrue = false;

    }
    void AppStartup(object sender, StartupEventArgs e)
    {
        IsTrue = true;
        new Thread(DoWork).Start();
        while (IsTrue)
        { }
        Current.Shutdown();
    }
}

}

Upvotes: 1

JoshVarga
JoshVarga

Reputation: 705

I wrote a project that did exactly what you are talking about, we used the following project from Microsoft, http://code.msdn.microsoft.com/WPFShell Initially I tried writing it myself by turning off the chrome, not a good idea unless you don't want to be able to drag your window around in the standard windows method.

Upvotes: 2

Related Questions