Mahapps.metro: Close, Minimize UI break and window glow border doesn't apply

Created on 26 Jul 2016  路  12Comments  路  Source: MahApps/MahApps.Metro

On some random initial hover after window load over application and window glow isn't working

_When the application starts and after some heavy data is loaded in DataGrid, when you randomly hover over any element or on close, minimize buttons it gets replaced to classic windows button. On hover again or mouse move it gets replaced._

It should remain constant

_The UI on close button should not break, and also window glow should be coming as expected._

Environment

  • MahApps.Metro v1.2.4.0
  • Windows 7
  • Visual Studio 2013
  • .NET Framework 4.5

My wild guess is, is this because of heavy data load on grid? If so what is the overcome? Attaching screenshots for reference.

Code for window

<Controls:MetroWindow x:Class="Home"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        BorderThickness="0" GlowBrush="Black"
        WindowCloseButtonStyle="{DynamicResource MetroWindowCloseButtonStyle}">

The above code works for Login screen, where no such data load occurs but not once login is done.

mahapps

All 12 comments

@kshkrao3 Thx for reporting. You set the BorderThickness to zero, so no Glow border is shown. Can you use the pre-release for testing if the button issue also happens? And another, have you tried to use virtualization on your DataGrid? Thx

@punker76 I've set same Glow border to other window wherein its working fine. For this window I changed it to 1, the border is coming fine but not the Glow, kind of blur/shadow effect on borders isn't coming. Is there anything am missing? What version is pre-release by the way? As per your suggestion, I've tried using virtualization on DataGrid, even then I saw issue coming. Also it creates lag on the application. It will be helpful if you could please let me how to resolve this without virtualization.

@kshkrao3 the latest pre-release is available here https://www.nuget.org/packages/MahApps.Metro/1.3.0-ALPHA179

@punker76 Sure.. Let me try this version and will let you know if continue to face the issue or vice versa. Any suggestions of Window Glow?

@kshkrao3 I have no idea for your Glow issue. Should be working fine :-( Do you running your app on a normal OS pc or via remote or on VM?

@punker76 Normal PC itself.. Let me see if I can get over this issue by using pre-release version. I'll keep posted.. :) Good job and really appreciate the library you guys have built.. :) :+1:

@punker76 I've resolved the issue. Basically this happens when there is a heavy load of data to the DataGrid. What I've done is, I've added ContentRendered event to Window and then am loading the Data asynchronously, which resolved both UI and glow border effect issue. But, it will be good if this issue is resolved for heavy data without asynchronous load. Thanks much once again.. Cheers.. :+1:

@kshkrao3 Ah that's cool. But, loading huge data on the UI thread is always blocking this thread, so you get always UI issues also without MahApps too, maybe on other places then the button issue. So it's maybe not resolvable by me ...

@punker76 Agree on your point.. Anyways, happy that this is resolved.. :) Thanks much for suggestions.. :) :+1:

@punker76 Am seeing this issue again in my different application, but this time no data loading nothing. Just a simple Home Window after Login and settings are same as above. There is a UI break for minimize and close button when I press alt key.. I have included latest pre-release - MahApps.Metro -Version 1.3.0-ALPHA195 -Pre but still seeing this issue. Am building this on windows 10. Anything you can help me on this.?

@kshkrao3 That's bad :-( Can separate your code in an app to reproduce this?

@punker76 .. Not replicable.. :( Is it because of moving from one window to another and making use of some usercontrols in home window?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

furqansafdar picture furqansafdar  路  11Comments

patriksvensson picture patriksvensson  路  18Comments

webprofusion-chrisc picture webprofusion-chrisc  路  11Comments

SamOxyPlot picture SamOxyPlot  路  14Comments

ghost picture ghost  路  18Comments