packages/MaterialDesignThemes.2.5.0.1205/src/net45/ClockItemButton.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Input;

namespace MaterialDesignThemes.Wpf
{	

	[TemplatePart(Name = ThumbPartName, Type = typeof(Thumb))]
	public class ClockItemButton : ToggleButton
	{
		public const string ThumbPartName = "PART_Thumb";
		
		public static readonly DependencyProperty CentreXProperty = DependencyProperty.Register(
            nameof(CentreX), typeof (double), typeof (ClockItemButton), new PropertyMetadata(default(double)));

		public double CentreX
		{
			get { return (double) GetValue(CentreXProperty); }
			set { SetValue(CentreXProperty, value); }
		}

		public static readonly DependencyProperty CentreYProperty = DependencyProperty.Register(
            nameof(CentreY), typeof (double), typeof (ClockItemButton), new PropertyMetadata(default(double)));

		public double CentreY
		{
			get { return (double) GetValue(CentreYProperty); }
			set { SetValue(CentreYProperty, value); }
		}

		private static readonly DependencyPropertyKey XPropertyKey =
			DependencyProperty.RegisterReadOnly(
				"X", typeof(double), typeof(ClockItemButton),
				new PropertyMetadata(default(double)));

		public static readonly DependencyProperty XProperty =
			XPropertyKey.DependencyProperty;

		public double X
		{
			get { return (double)GetValue(XProperty); }
			private set { SetValue(XPropertyKey, value); }
		}

		private static readonly DependencyPropertyKey YPropertyKey =
			DependencyProperty.RegisterReadOnly(
				"Y", typeof(double), typeof(ClockItemButton),
				new PropertyMetadata(default(double)));

		public static readonly DependencyProperty YProperty =
			YPropertyKey.DependencyProperty;

		private Thumb _thumb;

		public double Y
		{
			get { return (double)GetValue(YProperty); }
			private set { SetValue(YPropertyKey, value); }
		}
后面还有 128 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。