Ordinary buttons can not be set smaller than 109 px, RadioButtons not smaller than 168px.
These limits allow only to place 3 buttons or 2 radio buttons horizontally side by side.
Is there a way to make the buttons smaller?
Some Controls have set as default MinHeight
/MinWidth
to ThemeResource value. You may change this value while defining a Control or change its Style - you will find there (for example in Button
):
// in Style
// ...
<Setter Property="MinHeight" Value="{ThemeResource PhoneButtonMinHeight}"/>
<Setter Property="MinWidth" Value="{ThemeResource PhoneButtonMinWidth}"/>
// ...
Unless you override those values, the minimum will be honored where there is a conflict - at MSDN:
MinWidth is one of three writable properties on FrameworkElement that specify width information. The other two are MaxWidth and Width. If there is a conflict between these values, the order of application for actual width determination is that first MinWidth must be honored, then MaxWidth, and finally, if it is within bounds, Width. All of these properties are recommendations to the layout behavior of the element's parent in the object tree. The width of the object after layout runs is available as the ActualWidth property value.
For button control set MinHeight
and MinWidth
property for your desired height/width.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With