Inheritance: RepeatButton
Esempio n. 1
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            upButton   = (DragRepeatButton)Template.FindName("PART_UpButton", this);
            downButton = (DragRepeatButton)Template.FindName("PART_DownButton", this);
            textBox    = (TextBox)Template.FindName("PART_TextBox", this);

            upButton.Click   += upButton_Click;
            downButton.Click += downButton_Click;

            textBox.LostFocus += (sender, e) => OnLostFocus(e);

            var upDrag   = new DragListener(upButton);
            var downDrag = new DragListener(downButton);

            upDrag.Started   += drag_Started;
            upDrag.Changed   += drag_Changed;
            upDrag.Completed += drag_Completed;

            downDrag.Started   += drag_Started;
            downDrag.Changed   += drag_Changed;
            downDrag.Completed += drag_Completed;

            Print();
        }
Esempio n. 2
0
		public override void OnApplyTemplate()
		{
			base.OnApplyTemplate();

			upButton = (DragRepeatButton)Template.FindName("PART_UpButton", this);
			downButton = (DragRepeatButton)Template.FindName("PART_DownButton", this);
			textBox = (TextBox)Template.FindName("PART_TextBox", this);

			upButton.Click += upButton_Click;
			downButton.Click += downButton_Click;
			
			textBox.LostFocus += (sender, e) => OnLostFocus(e);

			var upDrag = new DragListener(upButton);
			var downDrag = new DragListener(downButton);

			upDrag.Started += drag_Started;
			upDrag.Changed += drag_Changed;
			upDrag.Completed += drag_Completed;

			downDrag.Started += drag_Started;
			downDrag.Changed += drag_Changed;
			downDrag.Completed += drag_Completed;

			Print();
		}