2017-06-25 23:05:48 +02:00
|
|
|
|
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
|
|
|
|
|
// © 2017 Clemens Fischer
|
2012-11-22 21:42:29 +01:00
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
|
|
|
|
|
using System.Windows;
|
2012-11-23 23:00:50 +01:00
|
|
|
|
using System.Windows.Controls;
|
2012-11-22 21:42:29 +01:00
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
2013-08-17 08:41:11 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Manages a collection of selectable items on a Map. Uses MapItem as item container class.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class MapItemsControl : ListBox
|
2012-11-22 21:42:29 +01:00
|
|
|
|
{
|
|
|
|
|
|
static MapItemsControl()
|
|
|
|
|
|
{
|
2017-06-25 23:05:48 +02:00
|
|
|
|
DefaultStyleKeyProperty.OverrideMetadata(typeof(MapItemsControl), new FrameworkPropertyMetadata(typeof(MapItemsControl)));
|
2012-11-22 21:42:29 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2013-08-17 08:41:11 +02:00
|
|
|
|
protected override DependencyObject GetContainerForItemOverride()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new MapItem();
|
2012-11-22 21:42:29 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2014-06-11 23:03:13 +02:00
|
|
|
|
protected override bool IsItemItsOwnContainerOverride(object item)
|
|
|
|
|
|
{
|
|
|
|
|
|
return item is MapItem;
|
|
|
|
|
|
}
|
2012-11-22 21:42:29 +01:00
|
|
|
|
}
|
2013-08-17 08:41:11 +02:00
|
|
|
|
}
|