Although, I think your snippet is wrong, and it will bite on people's behinds if they use it as it is ;)
|Theme currentTheme = ThemeResolutionService.GetTheme("Desert");//we will modify desert theme
| currentTheme.ThemeProperties["BaseColor"] = HslColor.FromColor(Color.Red);
I think it should be more like that. At least the other example failed to compile because of the first line and the last (the cast is invalid, it says). Am I right?