Acces controls inside DataBoundListBox...?!

3 posts, 0 answers
  1. Xmenus
    Xmenus avatar
    2 posts
    Member since:
    May 2012

    Posted 28 May 2012 Link to this post

    Hi all,

    Can anyone explain how to access or get names of children inside this case names of TextBlock-s?!
    Xaml is as follows.
    One more question though it's not related to this but anyways it has to do with DataBoundListBox....
    Check out here  VirtualizingDataCollection  When i debug i see that (startIndex=0) is always zero.Does it mean that it should be always zero?!

    Thanks to all,

                <Border Background="#FFE5FFCB"
                    <StackPanel Name="mystack"
                        <!--<Border Background="#B4B900AF">-->
                        <TextBlock Name="txtName"
                                   FontStretch="UltraCondensed" />
                        <!--<Border Background="#FF20BAE2">-->
                        <TextBlock Name="txtLastName"
                                   Text="{Binding Path=LastName}"
                                   FontFamily="Portable User Interface"
                                   UseLayoutRounding="False" />

  2. Deyan
    Deyan avatar
    2026 posts

    Posted 31 May 2012 Link to this post

    Hi Xmenus,

    You can use the VisualTreeHelper class to traverse the visual tree of any UIElement in Silverlight. Could you please share some further details why would you need to access elements within the visual tree?

    As for the VirtualizingDataCollection question: the startIndex depends on the data currently loaded in the collection.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Xmenus
    Xmenus avatar
    2 posts
    Member since:
    May 2012

    Posted 02 Jun 2012 Link to this post

    I solved the problem using VisualTreeHelper class...Thank you!
Back to Top