}
private StringSelector InternalThumbImageURLSelector
{
- get => thumbImage == null ? null : new StringSelector(thumbImage.ResourceUrlSelector);
+ get => thumbImage?.ResourceUrlSelector == null ? null : new StringSelector(thumbImage.ResourceUrlSelector);
set
{
if (value == null || thumbImage == null)
public static readonly BindableProperty ThumbImageURLSelectorProperty = BindableProperty.Create(nameof(ThumbImageURLSelector), typeof(StringSelector), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var instance = (Slider)bindable;
- if (newValue != null)
- {
- instance.InternalThumbImageURLSelector = newValue as StringSelector;
- }
+ instance.InternalThumbImageURLSelector = newValue as StringSelector;
},
defaultValueCreator: (bindable) =>
{
}
private StringSelector InternalSwitchBackgroundImageURLSelector
{
- get => new StringSelector(Icon.ResourceUrlSelector);
+ get => Icon?.ResourceUrlSelector == null ? null : new StringSelector(Icon.ResourceUrlSelector);
set
{
Debug.Assert(Icon != null);