开发者

Silverlight combo popup not displayed correctly when window resizes

开发者 https://www.devze.com 2023-02-25 15:15 出处:网络
If I create a ComboBox from scratch, when the window is resized, the content is correctly displayed above/below, etc.

If I create a ComboBox from scratch, when the window is resized, the content is correctly displayed above/below, etc.

Why开发者_Go百科 this doesn't happen when you create your own Combo-derived class? What am I missing?


Controls aren't magical. They need to be told that things happen (call a method on them) or look for them to happen (register for an event).

Find your Application.RootVisual and register for a SizeChanged event. Then resize your control. If it is in browser you may need to create a javascript bridge (hopefully not) that tells your SL object when the browser resizes.

0

精彩评论

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