}
private StringSelector InternalTextSelector
{
- get => buttonText == null ? null : new StringSelector(buttonText.TextSelector);
+ get => buttonText?.TextSelector == null ? null : new StringSelector(buttonText.TextSelector);
set
{
if (value == null || buttonText == null)
}
private StringSelector InternalTranslatableTextSelector
{
- get => buttonText == null ? null : new StringSelector(buttonText.TranslatableTextSelector);
+ get => (buttonText?.TranslatableTextSelector == null) ? null : new StringSelector(buttonText.TranslatableTextSelector);
set
{
if (value == null || buttonText == null)
}
private ColorSelector InternalTextColorSelector
{
- get => buttonText == null ? null : new ColorSelector(buttonText.TextColorSelector);
+ get => buttonText?.TextColorSelector == null ? null : new ColorSelector(buttonText.TextColorSelector);
set
{
if (value == null || buttonText == null)
}
private FloatSelector InternalPointSizeSelector
{
- get => buttonText == null ? null : new FloatSelector(buttonText.PointSizeSelector);
+ get => buttonText?.PointSizeSelector == null ? null : new FloatSelector(buttonText.PointSizeSelector);
set
{
if (value == null || buttonText == null)
}
private StringSelector InternalIconURLSelector
{
- get => buttonIcon == null ? null : new StringSelector(buttonIcon.ResourceUrlSelector);
+ get => buttonIcon?.ResourceUrlSelector == null ? null : new StringSelector(buttonIcon.ResourceUrlSelector);
set
{
if (value == null || buttonIcon == null)
public static readonly BindableProperty TextSelectorProperty = BindableProperty.Create(nameof(TextSelector), typeof(StringSelector), typeof(Button), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var instance = (Button)bindable;
- if (newValue != null)
- {
- instance.InternalTextSelector = newValue as StringSelector;
- }
+ instance.InternalTextSelector = newValue as StringSelector;
},
defaultValueCreator: (bindable) =>
{
public static readonly BindableProperty TranslatableTextSelectorProperty = BindableProperty.Create(nameof(TranslatableTextSelector), typeof(StringSelector), typeof(Button), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var instance = (Button)bindable;
- if (newValue != null)
- {
- instance.InternalTranslatableTextSelector = newValue as StringSelector;
- }
+ instance.InternalTranslatableTextSelector = newValue as StringSelector;
},
defaultValueCreator: (bindable) =>
{
public static readonly BindableProperty TextColorSelectorProperty = BindableProperty.Create(nameof(TextColorSelector), typeof(ColorSelector), typeof(Button), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var instance = (Button)bindable;
- if (newValue != null)
- {
- instance.InternalTextColorSelector = newValue as ColorSelector;
- }
+ instance.InternalTextColorSelector = newValue as ColorSelector;
},
defaultValueCreator: (bindable) =>
{
public static readonly BindableProperty PointSizeSelectorProperty = BindableProperty.Create(nameof(PointSizeSelector), typeof(FloatSelector), typeof(Button), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var instance = (Button)bindable;
- if (newValue != null)
- {
- instance.InternalPointSizeSelector = newValue as FloatSelector;
- }
+ instance.InternalPointSizeSelector = newValue as FloatSelector;
},
defaultValueCreator: (bindable) =>
{
public static readonly BindableProperty IconURLSelectorProperty = BindableProperty.Create(nameof(IconURLSelector), typeof(StringSelector), typeof(Button), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var instance = (Button)bindable;
- if (newValue != null)
- {
- instance.InternalIconURLSelector = newValue as StringSelector;
- }
+ instance.InternalIconURLSelector = newValue as StringSelector;
},
defaultValueCreator: (bindable) =>
{