aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/MainView.xaml.cs
blob: bc3f747e84e253f711d8d326c1e274a21b6b3de6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
generated by cgit v1.3.1 (git 2.54.0) at 2026-07-25 10:25:40 +0000
 


pan class="p">.Register("IsMouseOrTouchDown", typeof(bool), typeof(TouchSlider), new PropertyMetadata(false));

        public ControlTemplate ThumbTemplate
        {
            get { return (ControlTemplate)GetValue(ThumbTemplateProperty); }
            set { SetValue(ThumbTemplateProperty, value); }
        }
        public static readonly DependencyProperty ThumbTemplateProperty =
            DependencyProperty.Register("ThumbTemplate", typeof(ControlTemplate), typeof(TouchSlider), new PropertyMetadata(null));

        public TouchSlider()
        {
            this.RegisterForPreviewMouseOrTouchDown(OnMouseDown);
            this.RegisterForPreviewMouseOrTouchUp(OnMouseUp);
        }

        private void OnMouseUp(object sender, MouseOrTouchEventArgs e)
        {
            IsMouseOrTouchDown = false;
        }

        private void OnMouseDown(object sender, MouseOrTouchEventArgs e)
        {
            IsMouseOrTouchDown = true;
        }
    }
}