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
75
How do I check the text property of a textblock control that is in a template that is used in a XamCarouselListBox
posted

Hi

I have a Carousel list box that displays items using an item template. the item template has a few controls like image and text block. How can I get the text property of the text block control for a given Carousel list item.

I need to loop through the list and set list items to invisible if the items (TextBlock control) dont contain any text.

thanks

Parents
No Data
Reply
  • 8576
    Offline posted

    Hi -

    Rather than searching through the visible elements in code this is something you would typically do with a trigger in the Item Template itself.  For example, you could use a DataTrigger to trigger off the value that the TextBlock is bound to and set the Visibility of the root element in the Item Template to Collapsed if the value is empty. 

    Joe

Children
No Data