|
using System;
using System.Windows;
using Microsoft.Windows.Shell;
namespace CustomChromeLibrary
{
public class CloseButton : CaptionButton
{
static CloseButton()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(CloseButton), new FrameworkPropertyMetadata(typeof(CloseButton)));
}
protected override void OnClick()
{
base.OnClick();
SystemCommands.CloseWindow(Window.GetWindow(this));
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Greg has been working in software development in a variety of roles since 1990.