void IActiveTaskDialog.SetButtonElevationRequiredState(int buttonId, bool elevationRequired) { if (NormalButtons.Any(b => b.ID == buttonId)) { NormalButtons.First(b => b.ID == buttonId).IsElevationRequired = elevationRequired; } else if (CommandLinks.Any(cl => cl.ID == buttonId)) { CommandLinks.First(b => b.ID == buttonId).IsElevationRequired = elevationRequired; } }
void IActiveTaskDialog.SetButtonEnabledState(int buttonId, bool enabled) { if (NormalButtons.Any(b => b.ID == buttonId)) { NormalButtons.First(b => b.ID == buttonId).IsEnabled = enabled; } else if (CommandLinks.Any(cl => cl.ID == buttonId)) { CommandLinks.First(b => b.ID == buttonId).IsEnabled = enabled; } else if (RadioButtons.Any(rb => rb.ID == buttonId)) { RadioButtons.First(b => b.ID == buttonId).IsEnabled = enabled; } }
bool IActiveTaskDialog.ClickButton(int buttonId) { if (NormalButtons.Any(b => b.ID == buttonId)) { NormalButtonCommand.Execute(buttonId); return(true); } else if (CommandLinks.Any(cl => cl.ID == buttonId)) { CommandLinkCommand.Execute(buttonId); return(true); } else if (RadioButtons.Any(rb => rb.ID == buttonId)) { RadioButtonCommand.Execute(buttonId); return(true); } return(false); }
public NavigationViewModel(LocalDate selectedDate, string linkPage, params NavigationLink[] links) { SelectedDate = selectedDate; LinkPage = linkPage; CommandLinks.AddRange(links); }