Slider.SelectionStart Slider.SelectionStart Slider.SelectionStart Slider.SelectionStart Property

定義

Slider で指定された選択範囲の最小値を取得または設定します。Gets or sets the smallest value of a specified selection for a Slider.

public:
 property double SelectionStart { double get(); void set(double value); };
[System.ComponentModel.Bindable(true)]
public double SelectionStart { get; set; }
member this.SelectionStart : double with get, set
Public Property SelectionStart As Double

プロパティ値

Slider の選択している値の範囲の最大値。The largest value of a selected range of values of a Slider. 既定値は 0 です。The default is zero (0.0).

SelectionEnd プロパティを設定する方法を次の例に示します。The following example shows how to set the SelectionEnd property.

Slider hslider = new Slider();
hslider.Orientation = Orientation.Horizontal;
hslider.Width = 100;
hslider.Minimum = 1;
hslider.Maximum = 10;
hslider.IsDirectionReversed = true;
hslider.IsMoveToPointEnabled = true;
hslider.AutoToolTipPrecision = 2;
hslider.AutoToolTipPlacement =
  AutoToolTipPlacement.BottomRight;
hslider.TickPlacement = TickPlacement.BottomRight;

// Manually add ticks to the slider.
DoubleCollection tickMarks = new DoubleCollection();
tickMarks.Add(0.5);
tickMarks.Add(1.5);
tickMarks.Add(2.5);
tickMarks.Add(3.5);
tickMarks.Add(4.5);
tickMarks.Add(5.5);
tickMarks.Add(6.5);
tickMarks.Add(7.5);
tickMarks.Add(8.5);
tickMarks.Add(9.5);
hslider.Ticks = tickMarks;

// Create a selection range.
hslider.IsSelectionRangeEnabled = true;
hslider.SelectionStart = 2.5;
hslider.SelectionEnd = 7.5;
cv2.Children.Add(hslider);
Dim hslider As New Slider()
hslider.Orientation = Orientation.Horizontal
hslider.Width = 100
hslider.Minimum = 1
hslider.Maximum = 10
hslider.IsDirectionReversed = True
hslider.IsMoveToPointEnabled = True
hslider.AutoToolTipPrecision = 2
hslider.AutoToolTipPlacement = AutoToolTipPlacement.BottomRight
hslider.TickPlacement = TickPlacement.BottomRight
Dim tickMarks As New DoubleCollection()
tickMarks.Add(0.5)
tickMarks.Add(1.5)
tickMarks.Add(2.5)
tickMarks.Add(3.5)
tickMarks.Add(4.5)
tickMarks.Add(5.5)
tickMarks.Add(6.5)
tickMarks.Add(7.5)
tickMarks.Add(8.5)
tickMarks.Add(9.5)
hslider.Ticks = tickMarks
hslider.IsSelectionRangeEnabled = True
hslider.SelectionStart = 2.5
hslider.SelectionEnd = 7.5
cv2.Children.Add(hslider)
<Slider Width="100" 
        Orientation="Horizontal"  
        Minimum="1" Maximum="10" 
        IsDirectionReversed="True"
        IsMoveToPointEnabled="True"
        AutoToolTipPrecision="2" AutoToolTipPlacement="BottomRight"
        TickPlacement="BottomRight"
        Ticks="0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5" 
        IsSelectionRangeEnabled="true"
        SelectionStart="2.5" SelectionEnd="7.5" Name="mySlider"/>

注釈

値、SelectionStartプロパティには、値より小さくすることはできません、Minimumプロパティの値より大きくすることはできません、Maximumプロパティ。The value of the SelectionStart property cannot be less than the value of the Minimum property and cannot be greater than the value of the Maximum property. 値、SelectionEndプロパティの値以上にある必要がありますも、SelectionStartプロパティ。The value of the SelectionEnd property must also be greater than or equal to the value of the SelectionStart property. 場合SelectionStartがより小さいMinimum以上MaximumSelectionStartの値に設定されているMinimumまたはMaximumそれぞれします。If SelectionStart is less than Minimum or greater than Maximum, SelectionStart is set to the value of Minimum or Maximum respectively.

依存プロパティ情報Dependency Property Information

識別子フィールドです。Identifier Field SelectionStartProperty
メタデータのプロパティを設定するには trueMetadata properties set to true BindsTwoWayByDefault

適用対象

こちらもご覧ください