mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
32 lines
878 B
C#
32 lines
878 B
C#
// XAML Map Control - http://xamlmapcontrol.codeplex.com/
|
|
// © 2015 Clemens Fischer
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
namespace MapControl
|
|
{
|
|
/// <summary>
|
|
/// Manages a collection of selectable items on a Map. Uses MapItem as item container class.
|
|
/// </summary>
|
|
public class MapItemsControl : ListBox
|
|
{
|
|
static MapItemsControl()
|
|
{
|
|
DefaultStyleKeyProperty.OverrideMetadata(
|
|
typeof(MapItemsControl), new FrameworkPropertyMetadata(typeof(MapItemsControl)));
|
|
}
|
|
|
|
protected override DependencyObject GetContainerForItemOverride()
|
|
{
|
|
return new MapItem();
|
|
}
|
|
|
|
protected override bool IsItemItsOwnContainerOverride(object item)
|
|
{
|
|
return item is MapItem;
|
|
}
|
|
}
|
|
}
|