InformationLayer data binding requires InvalidateArrange() on collection change

5 posts, 0 answers
  1. Damian Slee
    Damian Slee avatar
    26 posts
    Member since:
    Nov 2009

    Posted 31 Mar 2010 Link to this post

    I have tried data binding an observable collection to an InformationLayer.   But it seems it does not catch the ICollectionChange event.  informationLayer.InvalidateArrange() needs to be called manually after the collection is altered.

     

     

     

            ObservableCollection<Pushpin> _pins = new ObservableCollection<Pushpin>();  
     
            private void radMap_InitializeCompleted(object sender, EventArgs e)  
            {  
                if (!this.isInitialized)  
                {  
                    isInitialized = true;  
     
                    // initializing draagable object  
                    Pushpin pushpin = new Pushpin();  
                    ToolTip tooltip = new ToolTip();  
                    tooltip.Content = "3 house st";  
                    ToolTipService.SetToolTip(pushpin, tooltip);  
                    this.MakeFrameworkElementDraggable(pushpin);  
                    MapLayer.SetLocation(pushpin, new Location(37.747440943384, -95.2481111547551));  
                    _pins.Add(pushpin);  
     
                    pushpin = new Pushpin();  
                    this.MakeFrameworkElementDraggable(pushpin);  
                    MapLayer.SetLocation(pushpin, new Location(37.247440943384, -95.8481111547551));  
                    _pins.Add(pushpin);  
     
                    informationLayer.ItemsSource = _pins;  
                }  
            }  
     
     
     
            private void Button_Click(object sender, RoutedEventArgs e)  
            {  
                Pushpin pushpin = new Pushpin();  
                ToolTip tooltip = new ToolTip();  
                tooltip.Content = "new pushpin";  
                ToolTipService.SetToolTip(pushpin, tooltip);  
     
     
                this.MakeFrameworkElementDraggable(pushpin);  
     
                MapLayer.SetLocation(pushpin, new Location(36.747440943384, -94.2481111547551));  
     
                _pins.Add(pushpin);  
                informationLayer.InvalidateArrange();  
            }  
     
     
     
     

     

  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 02 Apr 2010 Link to this post

    Hello Damian,

    Thank you for the feedback. We have addressed this issue. Please, download the latest internal build and give it a try.

    Sincerely yours,
    Andrey Murzov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Anton Z
    Anton Z avatar
    9 posts
    Member since:
    Oct 2008

    Posted 04 May 2010 Link to this post

    I have the same problem. Tried to use last build, but it does not help.

    How i can call informationLayer.InvalidateArrange() from ViewModel? =)
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 05 May 2010 Link to this post

    Hello Anton,

    Previous issue has been addressed to observable collection of FrameworkElements.
    We have checked the latest build. It works properly.
    Could you, please, create sample solution which demonstrates the problem?

    Kind regards,
    Andrey Murzov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Anton Z
    Anton Z avatar
    9 posts
    Member since:
    Oct 2008

    Posted 16 May 2010 Link to this post

    Hello Andrey,

    All work fine
    Sorry, it's my error

    PS may be you can help with another problem information layer binding
Back to Top
DevCraft banner