private async void _flyout_Opening(object sender, object e) { if (_recentColorItemsControl.ItemsSource == null) { _recentColorItemsControl.ItemsSource = await ColorPickerColorHelper.GetRecentColorsAsync(); } Window.Current.CoreWindow.KeyDown += CoreWindow_KeyDown; }
private async Task OnSelectedColorChanged() { await ColorPickerColorHelper.SetRecentColorsAsync(SelectedColor); if (SelectedColorChanged != null) { SelectedColorChanged(this, new EventArgs()); } }