某些控件已将默认的MinHeight / MinWidth设置为ThemeResource值.您可以在定义控件时更改此值或更改其样式 – 您将在那里找到(例如在Button中):
// in Style // ... <Setter Property="MinHeight" Value="{ThemeResource PhoneButtonMinHeight}"/> <Setter Property="MinWidth" Value="{ThemeResource PhoneButtonMinWidth}"/> // ...
除非您覆盖这些值,否则在发生冲突时将遵守最低值 – 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.