windowless wpf application example?

2.7k Views Asked by At

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...

2

There are 2 best solutions below

4
On BEST ANSWER

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.

0
On

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();
    }
}

}