お聞きしたい内容はタイトルの通りですが、具体的には以下のプロパティにアクセスできません。
C#
1using System; 2using Xamarin.Forms.Internals; 3using Xamarin.Forms.Platform; 4 5namespace Xamarin.Forms 6{ 7 [RenderWith(typeof(_SliderRenderer))] 8 public class Slider : View, IElementConfiguration<Slider> 9 { 10 (中略) 11 12 public static readonly BindableProperty MinimumTrackColorProperty = BindableProperty.Create(nameof(MinimumTrackColor), typeof(Color), typeof(Slider), Color.Default); 13 14 (中略) 15 16 public Color MinimumTrackColor 17 { 18 get { return (Color)GetValue(MinimumTrackColorProperty); } 19 set { SetValue(MinimumTrackColorProperty, value); } 20 } 21 22 (中略) 23 24}
Sliderクラスに関して言うと、MinumumTrackColorの他にもMaximumTrackColorやThumbColorなどにもアクセスできません。
XAMLとC#両方で試しましたがエラーが発生してしまいます。
公式のドキュメントを確認してみると、これらのプロパティと対応するフィールドは以下のような説明が書いてあります。
Fields
MaximumProperty Identifies the Maximum bindable property.
MaximumTrackColorProperty Backing store for the MaximumTrackColor property.
MinimumProperty Backing store for the Minimum property.
MinimumTrackColorProperty Backing store for the MinimumTrackColor property.
ThumbColorProperty Backing store for the ThumbColor property.
Properties
Maximum Gets or sets the maximum selectable value for the Slider. This is a bindable property.
MaximumTrackColor Gets or sets the color of the portion of the slider track that contains the maximum value of the slider.
Minimum Gets or sets the minimum selectable value for the Slider. This is a bindable property.
MinimumTrackColor Gets or sets the color of the portion of the slider track that contains the minimum value of the slider.
各プラットフォーム向けのNativeコントロールとXamarin.Formsコントロールを紐付けるViewRenderer辺りが怪しいのではないかと思っていろいろ調べているのですがなかなか解決しません。
Xamarin.Forms独特の仕様なのか、それともC#の機能なのかすら見当がついていない状態です。
一見publicに見えるプロパティにアクセスできない原因についてどなたかご存知無いでしょうか?
補足情報(FW/ツールのバージョンなど)
Xamarin.Forms : 3.0.0.482510
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/10/11 02:07