private async void ColorButton_Click(object sender, RoutedEventArgs e) { GradientColorSelector.ItemsSource = await GradientColorResource.GetLinearGradientCollectionAsync(); GradientColorSelector.SelectedIndex = await GradientColorResource.GetCurrentColorIndexAsync (ViewModel.WordNoteBookViewModel.GradientBackground1, ViewModel.WordNoteBookViewModel.GradientBackground2); ShowGradientColorSelectorMenu(false, (Button)sender); isopened = true; }
public async void UpdateGradientColorSelector() { GradientColorSelector.ItemsSource = await GradientColorResource.GetLinearGradientCollectionAsync(); }