当将“水平和垂直对齐"设置为中心时,“控件高度和宽度"项为零吗? [英] Items Control Height and Width comes as zero when horizontal and Vertical Alignment sets as center?

查看:102
本文介绍了当将“水平和垂直对齐"设置为中心时,“控件高度和宽度"项为零吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

当"Horizo​​ntalAlignment"和"VerticalAlignment"设置为"Custom ItemsControl"的位置中心时,不呈现控件,并且"Height"和"Width"为零.但是ItemsPresenter面板附带高度总数 和面板的宽度.您能帮我解决这个问题吗?

When HorizontalAlignment and VerticalAlignment sets as Center in position for Custom ItemsControl control is not rendering and Height and Width comes as zero. But ItemsPresenter panel comes with Totalnumber of height and width of the panel. Can you help me to solve this problem?

先谢谢了

里根人

推荐答案

我认为您应该访问ItemsControl的ActualHeight和ActualWidth.

i think you should access ItemsControl's ActualHeight and ActualWidth.


这篇关于当将“水平和垂直对齐"设置为中心时,“控件高度和宽度"项为零吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆