作者:.NET开发
项目:System.Window
//引入命名空间
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Automation.Peers;
using System.Windows.Automation.Provider;
using System.Windows.Automation;
using System.Globalization;
using System.Diagnostics;
namespace CustomControlLibrary
{
public partial class NumericUpDown : Control
{
static NumericUpDown()
{
InitializeCommands();
// Listen to MouseLeftButtonDown event to determine if slide should move focus to itself
EventManager.RegisterClassHandler(typeof(NumericUpDown),
Mouse.MouseDownEvent, new MouseButtonEventHandler(NumericUpDown.OnMouseLeftButtonDown), true);
DefaultStyleKeyProperty.OverrideMetadata(typeof(NumericUpDown), new FrameworkPropertyMetadata(typeof(NumericUpDown)));
}
}
}