我在xaml中声明我的自定义控件如下:
<local:CustomControl Visiblity="Hidden"/>
并覆盖CustomControl.OnApplyTemplate()
OnApplyTemplate():
{
base.OnApplyTemplate();
var show = Visibility == Visibility.Visible; // always true!!!
}
为什么Visibility属性的值仍然可见?该值何时适用?