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
1585
Access control inside datatemplate
posted

I am two-way databinding to create my Outlook Groups and the content for each group respectively.

How can I programatically access the controls inside the group? Since they are databound, when I look at my xamOutlookBar.Groups content it doesn't give me the controls but the actual Model that I am using for the binding.

I tried to use VisualTreeHelper but didnt have any luck with that.

 

Ideas?

Parents
No Data
Reply
  • 5595
    posted

    Hi,

    You are right, the OutlookBarGroup object's Content returns the corresponding data item from the data source your are binding to.

    Using the VisualTreeHelper could be used to access the controls defined with the DataTemplate.

    However, note that those controls are only accessible by the VisualTreeHelper when the Group is selected. Is that your case?

     

    HTH,

Children
No Data