c# - OnApplyTemplate method does not get called when the custom control is being rendered -



c# - OnApplyTemplate method does not get called when the custom control is being rendered -

i have made custom command windows phone 7.

if utilize command in xaml code, shows in both designer , emulator.

but if create in c# code , render in writeablebitmap, nil shows in writeablebitmap, , onapplytemplate not called either.

i tried calling applytemplate method , measure , arrange methods, none of them can create command rendered.

so right approach create custom command renderable in writeablebitmap?

thanks.

before wpf template applied, includes silverlight, object must added visual tree. calling applytemplate fail if object isn't in visual tree. create render properly, add together visual tree, can phone call applytemplate / updatelayout / etc. , have render correctly.

c# silverlight xaml windows-phone-7 custom-controls

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -