コード例 #1
0
        void OnClick(object sender, RoutedEventArgs e)
        {
			Mono.System.Windows.Controls.Slider hslider = new Mono.System.Windows.Controls.Slider();
            hslider.Orientation = Orientation.Horizontal;
            hslider.AutoToolTipPlacement =
              AutoToolTipPlacement.TopLeft;
            hslider.AutoToolTipPrecision = 2;
            hslider.IsDirectionReversed = true;
            hslider.Width = 100;
            hslider.IsMoveToPointEnabled = false;
            hslider.SelectionStart = 1.1;
            hslider.SelectionEnd = 3;
            hslider.IsSelectionRangeEnabled = false;
            hslider.IsSnapToTickEnabled = false;
            hslider.TickFrequency = 3;
			hslider.TickPlacement = Mono.System.Windows.Controls.Primitives.TickPlacement.Both;
            cv1.Children.Add(hslider);
       }
コード例 #2
0
 void OnClick(object sender, RoutedEventArgs e)
 {
     Mono.System.Windows.Controls.Slider hslider = new Mono.System.Windows.Controls.Slider();
     hslider.Orientation          = Orientation.Horizontal;
     hslider.AutoToolTipPlacement =
         AutoToolTipPlacement.TopLeft;
     hslider.AutoToolTipPrecision = 2;
     hslider.IsDirectionReversed  = true;
     hslider.Width = 100;
     hslider.IsMoveToPointEnabled    = false;
     hslider.SelectionStart          = 1.1;
     hslider.SelectionEnd            = 3;
     hslider.IsSelectionRangeEnabled = false;
     hslider.IsSnapToTickEnabled     = false;
     hslider.TickFrequency           = 3;
     hslider.TickPlacement           = Mono.System.Windows.Controls.Primitives.TickPlacement.Both;
     cv1.Children.Add(hslider);
 }
コード例 #3
0
        void OnClickNonUniform(object sender, RoutedEventArgs e)
        {
			Mono.System.Windows.Controls.Slider hslider = new Mono.System.Windows.Controls.Slider();
            hslider.Orientation = Orientation.Horizontal;
            hslider.Width = 100;
            hslider.IsMoveToPointEnabled = false;
            DoubleCollection tickMarks = new DoubleCollection();
            tickMarks.Add(1.1);
            tickMarks.Add(1.3);
            tickMarks.Add(2.0);
            tickMarks.Add(7.0);
            tickMarks.Add(10.0);
            hslider.Ticks = tickMarks;
			hslider.TickPlacement = Mono.System.Windows.Controls.Primitives.TickPlacement.BottomRight;
            hslider.AutoToolTipPlacement =
              AutoToolTipPlacement.TopLeft;
            hslider.AutoToolTipPrecision = 2;
            hslider.IsSnapToTickEnabled = true;
            cv2.Children.Add(hslider);
       }
コード例 #4
0
        void OnClickNonUniform(object sender, RoutedEventArgs e)
        {
            Mono.System.Windows.Controls.Slider hslider = new Mono.System.Windows.Controls.Slider();
            hslider.Orientation          = Orientation.Horizontal;
            hslider.Width                = 100;
            hslider.IsMoveToPointEnabled = false;
            DoubleCollection tickMarks = new DoubleCollection();

            tickMarks.Add(1.1);
            tickMarks.Add(1.3);
            tickMarks.Add(2.0);
            tickMarks.Add(7.0);
            tickMarks.Add(10.0);
            hslider.Ticks                = tickMarks;
            hslider.TickPlacement        = Mono.System.Windows.Controls.Primitives.TickPlacement.BottomRight;
            hslider.AutoToolTipPlacement =
                AutoToolTipPlacement.TopLeft;
            hslider.AutoToolTipPrecision = 2;
            hslider.IsSnapToTickEnabled  = true;
            cv2.Children.Add(hslider);
        }