Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
473
Accessing the adorner of the content pane at runtime
posted

HI,

I have a tab control which is added at runtime to the form.

Few panes are also added to this tab Item at runtime.

now i want to add a adorner layer on these panes (child controls of the tab control).

problem i am facing here is -
i am adding  the adorner in the Form_Loaded event.
the adorner gets added to the panes on the first tab only and not for the other tabs.

What i have found is the adorner layer for the second tab panes is null. (most probably the second tab doesnt gets loaded untill we actually click it.)


Thanks in advance,

Sachin

Parents
No Data
Reply
  • 54937
    Verified Answer
    Offline posted

    The TabGroupPane is just a derived TabControl. In a TabControl, the only content of tab item elements that actually exists within the visual tree is that of the selected tab. So in all likelihood the template of the ContentPane (which is what happens to contain an AdornerDecorator) hasn't been loaded by the framework because the element hasn't been put into the tree. Maybe you should put an AdornerDecorator as the Content of the ContentPane and put your content within that?

Children
No Data