A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
764 B

// -----------------------------------------------------------------------
// <copyright file="Button.cs" company="Steven Kirk">
// Copyright 2013 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.Controls
{
using System;
public class Button : ContentControl
{
public Button()
{
this.PointerPressed += (s, e) =>
{
this.Classes.Add(":pressed");
e.Device.Capture(this);
};
this.PointerReleased += (s, e) =>
{
e.Device.Capture(null);
this.Classes.Remove(":pressed");
};
}
}
}