//Reset the popup to defaults void Popup_Reset_ColorPicker() { try { //Clear the current popup list List_ColorPicker.Clear(); //Add current color to the list List_ColorPicker.Add((SolidColorBrush)Application.Current.Resources["ApplicationAccentLightBrush"]); //Add colors to the list foreach (uint uintColor in uintColors) { SolidColorBrush newSolidColorBrush = new SolidColorBrush(Color.FromArgb((byte)(uintColor >> 24), (byte)(uintColor >> 16), (byte)(uintColor >> 8), (byte)(uintColor))); List_ColorPicker.Add(newSolidColorBrush); } ; } catch { } }
async Task Popup_Close_ColorPicker() { try { if (vColorPickerOpen) { PlayInterfaceSound(vConfigurationCtrlUI, "PopupClose", false, false); //Reset popup variables vColorPickerOpen = false; //Clear the current popup list List_ColorPicker.Clear(); //Hide the popup Popup_Hide_Element(grid_Popup_ColorPicker); //Focus on the previous focus element await FrameworkElementFocusFocus(vColorPickerElementFocus, vProcessCurrent.MainWindowHandle); } } catch { } }