コード例 #1
0
 void UpdateSecondButton(bool initialize)
 {
     if (initialize && Element.SecondButton == null)
     {
         return;
     }
     if (Element.SecondButton != null)
     {
         if (Element.SecondButton is ColorMenuItem)
         {
             var item = ((ColorMenuItem)Element.SecondButton);
             _widget.ShowButton2(item.Text, item.IconImageSource as FileImageSource, item.BackgroundColor.ToNative(), () => ((IMenuItemController)item).Activate());
         }
         else
         {
             var item = Element.SecondButton;
             _widget.ShowButton2(item.Text, item.IconImageSource as FileImageSource, () => ((IMenuItemController)item).Activate());
         }
     }
     else
     {
         _widget.HideButton2();
     }
 }
コード例 #2
0
 void UpdateSecondButton(bool initialize)
 {
     if (initialize && Element.SecondButton == null)
     {
         return;
     }
     if (Element.SecondButton != null)
     {
         var item = Element.SecondButton;
         _widget.ShowButton2(item.Text, item.Icon, () => item.Activate());
     }
     else
     {
         _widget.HideButton2();
     }
 }