-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve CoreWindow host window implementation. (Thanks to Yifei Gao.)
- Loading branch information
1 parent
c93a2be
commit ae87c4e
Showing
2 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* PROJECT: Mouri Internal Library Essentials | ||
* FILE: CoreWindowHost.cs | ||
* PURPOSE: Definition for Mile.Xaml.CoreWindowHost | ||
* | ||
* LICENSE: The MIT License | ||
* | ||
* MAINTAINER: MouriNaruto (Kenji.Mouri@outlook.com) | ||
*/ | ||
|
||
using System.Windows.Forms; | ||
|
||
namespace Mile.Xaml | ||
{ | ||
internal class CoreWindowHost : Form | ||
{ | ||
private const int WS_EX_TRANSPARENT = 0x00000020; | ||
private const int WS_EX_LAYERED = 0x00080000; | ||
|
||
public CoreWindowHost() | ||
{ | ||
Controls.Add(new WindowsXamlHost()); | ||
Show(); | ||
Hide(); | ||
} | ||
|
||
protected override CreateParams CreateParams | ||
{ | ||
get | ||
{ | ||
CreateParams CreateParameters = base.CreateParams; | ||
CreateParameters.ExStyle = WS_EX_TRANSPARENT | WS_EX_LAYERED; | ||
CreateParameters.Style = 0; | ||
return CreateParameters; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters