Beispiel #1
0
        private void CreateFilterContexMenu()
        {
            var contextMenuModel = new ContextMenuModel();

            contextMenuModel.Add(new ContextMenuItemModel()
            {
                Id = "all", Title = Helper.SdkWrapper.GetLabel("allFilter"), IsSelected = true
            });
            contextMenuModel.Add(new ContextMenuItemModel()
            {
                Id = "online", Title = Helper.SdkWrapper.GetLabel("onlineFilter")
            });
            contextMenuModel.Add(new ContextMenuItemModel()
            {
                Id = "offline", Title = Helper.SdkWrapper.GetLabel("offlineFilter")
            });

            FilterContextMenu = new Controls.ContextMenu {
                AutomationId = "FilterContextMenu", WidthRequest = 140
            };
            FilterContextMenu.BindingContext = contextMenuModel;

            FilterContextMenu.Command = new RelayCommand <object>(FilterContextMenuCommand);

            Popup.Add(null, FilterContextMenu, PopupType.ContextMenu);
        }
Beispiel #2
0
        private void CreateOrderByContexMenu()
        {
            var contextMenuModel = new ContextMenuModel();

            contextMenuModel.Add(new ContextMenuItemModel()
            {
                Id = "firstname", Title = Helper.SdkWrapper.GetLabel("firstnameOrder"), IsSelected = true
            });
            contextMenuModel.Add(new ContextMenuItemModel()
            {
                Id = "lastname", Title = Helper.SdkWrapper.GetLabel("lastnameOrder")
            });
            contextMenuModel.Add(new ContextMenuItemModel()
            {
                Id = "company", Title = Helper.SdkWrapper.GetLabel("companyOrder")
            });

            OrderByContextMenu = new Controls.ContextMenu {
                AutomationId = "OrderByContextMenu", WidthRequest = 140
            };
            OrderByContextMenu.BindingContext = contextMenuModel;

            OrderByContextMenu.Command = new RelayCommand <object>(OrderByContextMenuCommand);

            Popup.Add(null, OrderByContextMenu, PopupType.ContextMenu);
        }