加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows-phone-8.1 – Windows Phone 8.1中按钮的最小尺寸

发布时间:2020-12-14 04:11:24 所属栏目:Windows 来源:网络整理
导读:普通按钮不能设置为小于109像素,RadioButtons不能小于168像素. 这些限制仅允许水平并排放置3个按钮或2个单选按钮. 有没有办法让按钮更小? 某些控件已将默认的MinHeight / MinWidth设置为ThemeResource值.您可以在定义控件时更改此值或更改其样式 – 您将在
普通按钮不能设置为小于109像素,RadioButtons不能小于168像素.

这些限制仅允许水平并排放置3个按钮或2个单选按钮.

有没有办法让按钮更小?

某些控件已将默认的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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读