Skip to content
This repository has been archived by the owner on Apr 10, 2020. It is now read-only.

Commit

Permalink
Fix XAML data binding for MapExtensions.Children
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinnara committed Mar 4, 2014
1 parent 2349055 commit 0e0a6a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Microsoft.Phone.Controls.Toolkit.WP8/Maps/MapExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static class MapExtensions
/// </summary>
public static readonly DependencyProperty ChildrenProperty = DependencyProperty.RegisterAttached(
"Children",
typeof(ObservableCollection<DependencyObject>),
typeof(DependencyObjectCollection<DependencyObject>),
typeof(MapExtensions),
null);

Expand All @@ -43,20 +43,20 @@ public static class MapExtensions
/// </summary>
/// <param name="element">The dependency object</param>
/// <returns>Returns <see cref="ObservableCollection&lt;DependencyObject&gt;"/></returns>
public static ObservableCollection<DependencyObject> GetChildren(Map element)
public static DependencyObjectCollection<DependencyObject> GetChildren(Map element)
{
if (element == null)
{
throw new ArgumentNullException("element");
}

ObservableCollection<DependencyObject> childrenCollection = (ObservableCollection<DependencyObject>)element.GetValue(MapExtensions.ChildrenProperty);
DependencyObjectCollection<DependencyObject> childrenCollection = (DependencyObjectCollection<DependencyObject>)element.GetValue(MapExtensions.ChildrenProperty);

if (childrenCollection == null)
{
MapExtensionsChildrenChangeManager childrenChangeManager;

childrenCollection = new ObservableCollection<DependencyObject>();
childrenCollection = new DependencyObjectCollection<DependencyObject>();
childrenChangeManager = new MapExtensionsChildrenChangeManager(childrenCollection)
{
Map = element
Expand All @@ -75,7 +75,7 @@ public static ObservableCollection<DependencyObject> GetChildren(Map element)
/// <param name="childrenCollection">An <see cref="ObservableCollection&lt;DependencyObject&gt;"/> to add to.</param>
/// <param name="dependencyObject">The dependency object to add.</param>
/// <param name="geoCoordinate">The geographic coordinate at which to add the dependency object.</param>
public static void Add(this ObservableCollection<DependencyObject> childrenCollection, DependencyObject dependencyObject, GeoCoordinate geoCoordinate)
public static void Add(this DependencyObjectCollection<DependencyObject> childrenCollection, DependencyObject dependencyObject, GeoCoordinate geoCoordinate)
{
if (childrenCollection == null)
{
Expand Down Expand Up @@ -103,7 +103,7 @@ public static void Add(this ObservableCollection<DependencyObject> childrenColle
/// <param name="dependencyObject">The dependency object to add.</param>
/// <param name="geoCoordinate">The geographic coordinate at which to add the dependency object.</param>
/// <param name="positionOrigin">The position origin to use.</param>
public static void Add(this ObservableCollection<DependencyObject> childrenCollection, DependencyObject dependencyObject, GeoCoordinate geoCoordinate, Point positionOrigin)
public static void Add(this DependencyObjectCollection<DependencyObject> childrenCollection, DependencyObject dependencyObject, GeoCoordinate geoCoordinate, Point positionOrigin)
{
if (childrenCollection == null)
{
Expand Down

0 comments on commit 0e0a6a6

Please sign in to comment.