mirror of https://github.com/dahall/Vanara.git
Updated dependencies on DWM changes
parent
b180778f2d
commit
4c0d2feeaa
|
@ -50,6 +50,7 @@ CREDUI_INFO
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Core\Vanara.Core.csproj" />
|
||||
<ProjectReference Include="..\Kernel32\Vanara.PInvoke.Kernel32.csproj" />
|
||||
<ProjectReference Include="..\Shared\Vanara.PInvoke.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -187,7 +187,7 @@ namespace Vanara.Windows.Forms
|
|||
ref tff, out tRect, out iRect);
|
||||
|
||||
// Draw background
|
||||
if (SupportGlass && !this.IsDesignMode() && DesktopWindowManager.IsCompositionEnabled())
|
||||
if (SupportGlass && !this.IsDesignMode() && DesktopWindowManager.CompositionEnabled)
|
||||
e.Graphics.Clear(Color.Black);
|
||||
else
|
||||
{
|
||||
|
@ -220,7 +220,7 @@ namespace Vanara.Windows.Forms
|
|||
}
|
||||
else
|
||||
{
|
||||
var br = DesktopWindowManager.IsCompositionEnabled() ? SystemBrushes.ActiveCaptionText : SystemBrushes.ControlText;
|
||||
var br = DesktopWindowManager.CompositionEnabled ? SystemBrushes.ActiveCaptionText : SystemBrushes.ControlText;
|
||||
var sf = new StringFormat(StringFormat.GenericDefault);
|
||||
if (rtl == RightToLeft.Yes) sf.FormatFlags |= StringFormatFlags.DirectionRightToLeft;
|
||||
e.Graphics.DrawString(Text, Font, br, ClientRectangle, sf);
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace Vanara.Windows.Forms
|
|||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
if (!this.IsDesignMode() && SupportGlass && DesktopWindowManager.IsCompositionEnabled())
|
||||
if (!this.IsDesignMode() && SupportGlass && DesktopWindowManager.CompositionEnabled)
|
||||
try { e.Graphics.Clear(Color.Black); } catch { }
|
||||
else
|
||||
{
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace Vanara.Windows.Forms
|
|||
/// <param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs" /> that contains the event data.</param>
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
if (!this.IsDesignMode() && SupportGlass && DesktopWindowManager.IsCompositionEnabled())
|
||||
if (!this.IsDesignMode() && SupportGlass && DesktopWindowManager.CompositionEnabled)
|
||||
try { e.Graphics.Clear(Color.Black); } catch { }
|
||||
else
|
||||
{
|
||||
|
|
|
@ -220,7 +220,7 @@ namespace Vanara.Windows.Forms
|
|||
private void form_Resize(object sender, EventArgs e)
|
||||
{
|
||||
var form = sender as Form;
|
||||
if ((DesktopWindowManager.IsCompositionEnabled() && GetGlassEnabled(form)) || form.IsDesignMode())
|
||||
if ((DesktopWindowManager.CompositionEnabled && GetGlassEnabled(form)) || form.IsDesignMode())
|
||||
InvalidateNonGlassClientArea(form);
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ namespace Vanara.Windows.Forms
|
|||
|
||||
private void GlassifyForm(Form form, Graphics g = null)
|
||||
{
|
||||
if (!(DesktopWindowManager.IsCompositionEnabled() && GetGlassEnabled(form)) && !form.IsDesignMode())
|
||||
if (!(DesktopWindowManager.CompositionEnabled && GetGlassEnabled(form)) && !form.IsDesignMode())
|
||||
return;
|
||||
|
||||
if (g == null) g = form.CreateGraphics();
|
||||
|
|
Loading…
Reference in New Issue