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();
        }
Example #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   += new RoutedEventHandler(upButton_Click);
            downButton.Click += new RoutedEventHandler(downButton_Click);

            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();
        }
Example #3
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 += new RoutedEventHandler(upButton_Click);
			downButton.Click += new RoutedEventHandler(downButton_Click);

			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();
		}
Example #4
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();
        }