CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.

Home Page:https://aka.ms/windowsappsdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why SetLocation and SetNormalizedAnchorPoint methods are not available in MapControl

kareemsulthan07 opened this issue · comments

I trying to add WPF XAML controls to an instance of MapControl class in my WPF app. MapControl indeed contains Children property to which I can add WPF XAML controls. But, when it comes to display the controls at locations (specified by lattitude and longitude values) the MapControl doesn't have neither SetLocation nor SetNormalizedAnchorPoint methods.

Is there any alternative class or methods through which I can achieve this?

Hello kareemsulthan07, thank you for your interest in Win32!

I have automatically added a "needs triage" label to help get things started. Our team will look into the question and answer ASAP. Other community members may also answer the question and provide feedback 🙌

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

Solved this by creating a sub class of Microsoft.ToolKit.Wpf.UI.Controls.MapControl and using the internal UWP MapControl object. Creating a sub class helped me to keep all the UWP related code at one place.