I declare my cu开发者_运维百科stom control in xaml as follow:
<local:CustomControl Visiblity="Hidden"/>
and override CustomControl.OnApplyTemplate()
OnApplyTemplate():
{
base.OnApplyTemplate();
var show = Visibility == Visibility.Visible; // always true!!!
}
Why is the value of the Visibility property is still Visible? When will the value be applied?
精彩评论