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

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -