Way to make a Windowless WPF window draggable without getting InvalidOperationException

后端 未结 4 1896
囚心锁ツ
囚心锁ツ 2020-12-30 10:39

I have a borderless WPF main window. I\'m trying to make it so that the end user can drag the window.

I\'ve added the following to the Window\'s constructor:

<
4条回答
  •  梦谈多话
    2020-12-30 11:32

    There is a Microsoft project that handles all the "windowless" style and much more, and it is opensource, you might want to take a look at http://code.msdn.microsoft.com/WPFShell. I am using on a commercial financial application, and hasn't run into any issues on any version of windows yet.

提交回复
热议问题