I am struggling with some WPF issues. This is just one of them:
{backgroundColor.SelectedColor = Properties.Settings.Default.backgroundColorSt;}
When I write this into my initiliaze() section, I face an error like:
cannot implicitly convert type 'system.drawing.color' to 'system.windows.media.color'
How can I convert System.Drawing.Color into System.Windows:Media.Color to save the color which I choose from colorPicker?
Don't use the type System.Drawing.Color
for your backgroundColorSt
setting in the first place. Instead, use System.Windows.Media.Color
.
In the Settings
page of your project properties,
backgroundColorSt
line Type
ComboBox,Browse...
,PresentationCore
assembly,System.Windows.Media
,Color
.