mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-05-07 13:37:47 +00:00
ParentMap property initialization
This commit is contained in:
parent
6a9b622793
commit
207565feba
12 changed files with 86 additions and 47 deletions
|
|
@ -19,6 +19,12 @@ namespace MapControl
|
|||
nameof(Location), typeof(Location), typeof(MapItem),
|
||||
new PropertyMetadata(null, (o, e) => MapPanel.SetLocation((MapItem)o, (Location)e.NewValue)));
|
||||
|
||||
public MapItem()
|
||||
{
|
||||
DefaultStyleKey = typeof(MapItem);
|
||||
MapPanel.InitMapElement(this);
|
||||
}
|
||||
|
||||
protected override void OnPointerPressed(PointerRoutedEventArgs e)
|
||||
{
|
||||
(ItemsControl.ItemsControlFromItemContainer(this) as MapItemsControl)?.OnItemClicked(
|
||||
|
|
@ -28,6 +34,12 @@ namespace MapControl
|
|||
|
||||
public partial class MapItemsControl
|
||||
{
|
||||
public MapItemsControl()
|
||||
{
|
||||
DefaultStyleKey = typeof(MapItemsControl);
|
||||
MapPanel.InitMapElement(this);
|
||||
}
|
||||
|
||||
public new FrameworkElement ContainerFromItem(object item)
|
||||
{
|
||||
return (FrameworkElement)base.ContainerFromItem(item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue