What steps will reproduce this issue?
NumericUpDown.StringFormat is working fine if declared in XAML, but if you try to change it via Code behind, it will cause an exception.
Expected outcome
Changing StringFormat should update the content while preserving the Value
Repo
https://github.com/skelvir/Wpf_NumericUDissue.git
Environment
- MahApps.Metro 1.5.0.23
- Windows 7 64-bit
- Visual Studio 2017 Community
- .NET Framework 4.5