コード例 #1
0
        public static void OnClick(IMenu menu, int index, IMXView view)
        {
            if (menu.ButtonCount <= 0)
            {
                return;
            }
            var button = menu.GetButton(index);

            if (!button.RaiseEvent("Clicked", EventArgs.Empty) && (button.Pair == null || !button.Pair.RaiseEvent("Clicked", EventArgs.Empty)))
            {
                DroidFactory.Navigate(button.NavigationLink, view);
            }
            Device.Log.Platform($"Clicked menu item \"{button.Title}\"");
        }
コード例 #2
0
        public bool Equals(IMenu other)
        {
            var menu = other as UI.Menu;

            return(menu?.Equals(this) ?? ReferenceEquals(this, other));
        }