Slider.SelectionEnd Slider.SelectionEnd Slider.SelectionEnd Slider.SelectionEnd Property

定義

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

public:
 property double SelectionEnd { double get(); void set(double value); };
[System.ComponentModel.Bindable(true)]
public double SelectionEnd { get; set; }
member this.SelectionEnd : double with get, set
Public Property SelectionEnd 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"/>

注釈

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

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

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

適用対象

こちらもご覧ください