开发者

Property value in xaml not picked up

开发者 https://www.devze.com 2023-03-19 13:50 出处:网络
I declare my cu开发者_运维百科stom control in xaml as follow: <local:CustomControl Visiblity=\"Hidden\"/>

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

精彩评论

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