public static readonly BindableProperty ButtonHeightProperty = BindableProperty.Create(nameof(ButtonHeight), typeof(int), typeof(Popup), default(int), propertyChanged: (bindable, oldValue, newValue) =>
{
var instance = (Popup)bindable;
- if (newValue != null)
+ if (newValue != null && instance?.Style?.Buttons?.Size != null )
{
instance.Style.Buttons.Size.Height = (int)newValue;
instance.btGroup.Itemheight = (int)newValue;
}
set
{
- Style.Title.Size.Height = value;
+ if (Style?.Title?.Size != null)
+ {
+ Style.Title.Size.Height = value;
+ }
}
}
titleY = (int)Style.Title.Position.Y;
}
- if (btGroup.Count != 0)
+ if (btGroup.Count != 0 && Style?.Buttons?.Size != null )
{
buttonH = (int)Style.Buttons.Size.Height;
}
return (T)((T)value).Clone();
}
- if (type == typeof(Selector<T>) && view != null)
+ if (type == typeof(Selector<T>) && view != null && value != null)
{
Selector<T> selector = (Selector<T>)value;
T valueInState = selector.GetValue(view.ControlState);