public Color GetColor(ColorProperty prop) { //valid values are 0xed9 to 0xeef if (!ClientUtils.IsEnumValid(prop, (int)prop, (int)ColorProperty.BorderColor, (int)ColorProperty.AccentColorHint)) { throw new InvalidEnumArgumentException(nameof(prop), (int)prop, typeof(ColorProperty)); } int color = 0; lastHResult = UxTheme.GetThemeColor(this, part, state, (int)prop, ref color); return(ColorTranslator.FromWin32(color)); }