The WPF UnitComboBox Control implements a combobox that allows the selection of values from different lists. Each list can represent a different unit (eg.: Celsius, Farenheit) and the viewmodel takes care of always converting to one unit (e.g. Celsius). This conversion is independent of what the user selected unit or value actually was.
This means, the application always sees only one unit and a different value while the user can use whatever unit he prefers to pick the aproppriate value.
Details are explained in a CodeProject article: https://www.codeproject.com/Articles/575645/Inheriting-from-a-Look-Less-WPF-Control
Sample Applications:
Load Light or Dark brush resources in you resource dictionary to take advantage of existing definitions.
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/UnitComboLib;component/Themes/DarkBrushs.xaml" />
</ResourceDictionary.MergedDictionaries>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/UnitComboLib;component/Themes/LightBrushs.xaml" />
</ResourceDictionary.MergedDictionaries>
These definitions do not theme all controls used within this library. You should use a standard theming library, such as:
- MahApps.Metro,
- MLib, or
- MUI
to also theme standard elements, such as, button and textblock etc.