|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace UpDownCtrls
{
/// <summary>
/// Interaction logic for UpDownButtons.xaml
/// </summary>
public partial class UpDownButtons : UserControl
{
public static readonly RoutedEvent UpClickEvent = EventManager.RegisterRoutedEvent("UpClick",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(UpDownButtons));
public event RoutedEventHandler UpClick
{
add { AddHandler(UpClickEvent, value); }
remove { RemoveHandler(UpClickEvent, value); }
}
public static readonly RoutedEvent DownClickEvent = EventManager.RegisterRoutedEvent("DownClick",
RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(UpDownButtons));
public event RoutedEventHandler DownClick
{
add { AddHandler(DownClickEvent, value); }
remove { RemoveHandler(DownClickEvent, value); }
}
public UpDownButtons()
{
InitializeComponent();
}
private void UpButton_Click(object sender, RoutedEventArgs e)
{
RoutedEventArgs UpClickEventArgs = new RoutedEventArgs(UpClickEvent);
RaiseEvent(UpClickEventArgs);
}
private void DownButton_Click(object sender, RoutedEventArgs e)
{
RoutedEventArgs DownClickEventArgs = new RoutedEventArgs(DownClickEvent);
RaiseEvent(DownClickEventArgs);
}
}
}
|
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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.