protected override void OnSourceInitialized(EventArgs e)
{
base.OnSourceInitialized(e);
GlassHelper.ExtendGlass(this, this.Grid.Margin);
Refresh();
var hwndSource = PresentationSource.FromVisual(this) as System.Windows.Interop.HwndSource;
if (hwndSource != null)
hwndSource.AddHook(HwndSourceHook);
MicroconeAPI.RegisterPnpNotification(hwndSource.Handle);
}