I am trying to create a round button, with a White Border and a Transparent Background (as the old AppBarButtons in Windows 8.1) in UWP Windows 10.
I have found several
Another sample
Result
Or Create fully customizable cornerradius
//Create a template control xaml design
//Template control.cs
public sealed class CustomRoundedButton : Button
{
private Grid _rootGrid = null;
public CustomRoundedButton()
{
this.DefaultStyleKey = typeof(CustomRoundedButton);
}
protected override void OnApplyTemplate()
{
base.OnApplyTemplate();
_rootGrid = GetTemplateChild("RootGrid") as Grid;
}
public CornerRadius CornerRadius
{
get { return (CornerRadius)GetValue(CornerRadiusProperty); }
set { SetValue(CornerRadiusProperty, value); }
}
public static readonly DependencyProperty CornerRadiusProperty =
DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(CustomRoundedButton), new PropertyMetadata(new CornerRadius(10,10,10,10)));
}
//Register to or merge dictionary from /Themes/Generic.xaml