void UpdateFirstButton(bool initialize) { if (initialize && Element.FirstButton == null) { return; } if (Element.FirstButton != null) { if (Element.FirstButton is ColorMenuItem) { var item = ((ColorMenuItem)Element.FirstButton); _widget.ShowButton1(item.Text, item.IconImageSource as FileImageSource, item.BackgroundColor.ToNative(), () => ((IMenuItemController)item).Activate()); } else { var item = Element.FirstButton; _widget.ShowButton1(item.Text, item.IconImageSource as FileImageSource, () => ((IMenuItemController)item).Activate()); } } else { _widget.HideButton1(); } }
void UpdateFirstButton(bool initialize) { if (initialize && Element.FirstButton == null) { return; } if (Element.FirstButton != null) { var item = Element.FirstButton; _widget.ShowButton1(item.Text, item.Icon, () => item.Activate()); } else { _widget.HideButton1(); } }