private static void _OnTaskbarItemInfoChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (DesignerProperties.GetIsInDesignMode(d)) { return; } Window window = (Window)d; TaskbarItemInfo taskbarItemInfo = (TaskbarItemInfo)e.OldValue; TaskbarItemInfo taskbarItemInfo2 = (TaskbarItemInfo)e.NewValue; if (taskbarItemInfo == taskbarItemInfo2) { return; } if (!Utility.IsOSWindows7OrNewer) { return; } if (taskbarItemInfo != null && taskbarItemInfo._window != null) { taskbarItemInfo._DetachWindow(); } if (taskbarItemInfo2 != null) { taskbarItemInfo2._SetWindow(window); } }
private static void _OnTaskbarItemInfoChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (!DesignerProperties.GetIsInDesignMode(d)) { Window window = (Window)d; TaskbarItemInfo oldValue = (TaskbarItemInfo)e.OldValue; TaskbarItemInfo newValue = (TaskbarItemInfo)e.NewValue; if ((oldValue != newValue) && Standard.Utility.IsOSWindows7OrNewer) { if ((oldValue != null) && (oldValue._window != null)) { oldValue._DetachWindow(); } if (newValue != null) { newValue._SetWindow(window); } } } }