开发者

Property value in xaml not picked up

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜