protected async Task SetMobileMenuAsync() { MobileMenu.CurrentValue = String.Join(",", MobileMenuAvailableModels.Where(m => MobileSelectedIdentifiers.Contains(m.Identifier)).Select(m => m.Identifier)); await MobileMenu.SetAsync(); MobileMenuEditor.Hide(); }
protected async override Task OnInitializedAsync() { await base.OnInitializedAsync(); EventHandlers.Add <UserPropertyChanged>(this); PriceDecimals = AddProperty("PriceDecimalDigits", "Price decimal digits", () => PriceDecimalsEditor.Show(), icon: "pound-sign", defaultValue: "2"); DateFormat = AddProperty("DateFormat", "Date format", () => DateFormatEditor.Show(), icon: "calendar-day", defaultValue: CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern); MobileMenu = AddProperty("MobileMenu", "Mobile menu", () => MobileMenuEditor.Show(), icon: "mobile"); MobileMenuAvailableModels = await Queries.QueryAsync(new ListAvailableMenuItem()); await LoadAsync(); MobileSelectedIdentifiers = MobileMenu.CurrentValue != null ? MobileMenu.CurrentValue.Split(',').ToList() : new List <string>(0); }