public override void Dispose() { ButtonClose.Dispose(); ButtonMaximized.Dispose(); this.Parent.Childs.Remove(this); }
void ButtonMaximized_Click(object sender, RoutedEventArgs e) { if (!mIsWinMax) { this.WindowState = System.Windows.WindowState.Maximized; ButtonMaximized.SetResourceReference(StyleProperty, "ButtonRestoreStyle"); } else { this.WindowState = System.Windows.WindowState.Normal; ButtonMaximized.SetResourceReference(StyleProperty, "ButtonMaximizedStyle"); } mIsWinMax = !mIsWinMax; }