I have created a borderless window with glass in the client area, upon loading, everything is fine, upon maximizing or enlarging, everything is still fine, upon restoring or making the window smaller, the window sizes fine but the Aero blurred background remains at the larger size.
The attached images are my window with my own border and title-bar.
You'll notice in the second image when I resize the window by clicking on the button you'll notice that the blurred background and window resizes but also leaves the top right blurred outside the window.
Any help would be greatly appreciated!!!
Here is the code behind:
//*********************************************************
namespace WpfApplication3
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
[Flags]
private enum DwmBlurBehindFlags : uint
{
/// <summary>
/// Indicates a value for fEnable has been specified.
/// </summary>
DWM_BB_ENABLE = 0x00000001,
/// <summary>
/// Indicates a value for hRgnBlur has been specified.
/// </summary>
DWM_BB_BLURREGION = 0x00000002,
/// <summary>
/// Indicates a value for fTransitionOnMaximized has been specified.
/// </summary>
DWM_BB_TRANSITIONONMAXIMIZED = 0x00000004
}
[StructLayout(LayoutKind.Sequential)]
private struct DWM_BLURBEHIND
{
public DwmBlurBehindFlags dwFlags;
public bool fEnable;
public IntPtr hRgnBlur;
public bool fTransitionOnMaximized;
}
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.