Pergunta

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

Foi útil?

Solução

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.

Outras dicas

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

}

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top