mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
ParentMap property initialization
This commit is contained in:
parent
6a9b622793
commit
207565feba
12 changed files with 86 additions and 47 deletions
|
|
@ -15,6 +15,11 @@ namespace MapControl
|
|||
|
||||
public static readonly DependencyProperty LocationProperty = MapPanel.LocationProperty.AddOwner(typeof(MapItem));
|
||||
|
||||
static MapItem()
|
||||
{
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(MapItem), new FrameworkPropertyMetadata(typeof(MapItem)));
|
||||
}
|
||||
|
||||
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
|
||||
{
|
||||
(ItemsControl.ItemsControlFromItemContainer(this) as MapItemsControl)?.OnItemClicked(
|
||||
|
|
@ -24,6 +29,11 @@ namespace MapControl
|
|||
|
||||
public partial class MapItemsControl
|
||||
{
|
||||
static MapItemsControl()
|
||||
{
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(MapItemsControl), new FrameworkPropertyMetadata(typeof(MapItemsControl)));
|
||||
}
|
||||
|
||||
public FrameworkElement ContainerFromItem(object item)
|
||||
{
|
||||
return (FrameworkElement)ItemContainerGenerator.ContainerFromItem(item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue