mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-09 00:14:51 +00:00
Cleanup of global usings
This commit is contained in:
parent
0a427a90de
commit
81eabef257
57 changed files with 207 additions and 54 deletions
|
|
@ -11,6 +11,10 @@ using Windows.UI.Xaml.Data;
|
|||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Data;
|
||||
#elif AVALONIA
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Data;
|
||||
#endif
|
||||
|
||||
namespace MapControl
|
||||
|
|
@ -118,18 +122,18 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
|
||||
private void PrepareContainer(DependencyObject container, object item)
|
||||
private void PrepareContainer(MapItem mapItem, object item)
|
||||
{
|
||||
if (LocationMemberPath != null && container is MapItem mapItem)
|
||||
if (LocationMemberPath != null)
|
||||
{
|
||||
mapItem.SetBinding(MapItem.LocationProperty,
|
||||
new Binding { Source = item, Path = new PropertyPath(LocationMemberPath) });
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearContainer(DependencyObject container)
|
||||
private void ClearContainer(MapItem mapItem)
|
||||
{
|
||||
if (LocationMemberPath != null && container is MapItem mapItem)
|
||||
if (LocationMemberPath != null)
|
||||
{
|
||||
mapItem.ClearValue(MapItem.LocationProperty);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue