12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using Xamarin.Forms.Xaml;
- using XF.Material.Forms.UI;
- namespace InABox.Mobile
- {
-
- [XamlCompilation(XamlCompilationOptions.Compile)]
- public partial class MobileModuleList
- {
- public IList<IModuleMenuItem> Items { get; }
-
- public MobileModuleList()
- {
- Items = new ObservableCollection<IModuleMenuItem>();
- InitializeComponent();
- Modules.ItemsSource = Items;
- }
- private void Module_Clicked(object sender, EventArgs e)
- {
- if (sender is MobileCard card)
- {
- if ((card.BindingContext is IModuleMenuItem module) && module.IsEnabled)
- module.Tap();
- }
- }
- }
- }
|