I have the following two buttons in XAML:
In .NET Core @Sorskoot's answer was working, but produced a warning. So instead I used this namespace declaration:
xmlns:system="clr-namespace:System;assembly=System.Runtime"