What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 19594 |  Welcome, Guest!   Register  Login
  Home > Community Home >

Did beta2 break something in FindName?

 Author: brucemartin | Posted on: 6/22/2008 6:20:06 PM | Views: 40

Recommend an Articles | Recommended Articles | Search Resources | Community Home |




Some code of mine worked in Beta1, but does not work in Beta2. I have an UserControl where I define a stackpanel in xaml, then programmatically I add a variable number of canvases. Each canvas has rectangles, lines, textblocks. The elements in each canvas are assigned names so that they can be found later.

In Beta1 I could use "Result = StackPanel.FindName(ItemName)" to find one of the rectangles. But this fails to work in Beta2. Here is some code that I use now to find the rectangles as I need them:

    Private Function FindOutlineElementItem(ByVal Parent As Object, ByVal ItemName As String) As Object
        Dim TestResult1 = CType(Parent, StackPanel).FindName(ItemName) '<-test only-
        Dim nChildCount = Parent.Children.Count
        For i = nChildCount - 1 To 0 Step -1
       ... Go to the complete details ...

Found interesting? Add this to:


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/21/2013 9:23:12 PM