A User Control wraps the UI with appropriate properties and events to make it a reusable component. In this User Control, named ColorMixer, we created a dependency property called SelectedColor of type Color. The user (the developer or the designer) can also set a default value to it, by accessing the property, while adding it to the application UI.
The Text property of the TextBox controls, inside the ColorMixer.xaml, is bound with the SelectedColor property. As the types of Text and SelectedColor properties are different, we required the value converter here.
ConverterParameter is used to define whether we need to break the R, G, B, or A value of the color composition. The Convert method of the converter class breaks the color according to the parameter and returns, which gets displayed in the appropriate TextBox control:
switch (parameterValue) { case "r": return color.R; case "g": return color.G; case "...