MainPage.Xaml中:
<Page
x:Class="Location.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Location"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:Maps="using:Windows.UI.Xaml.Controls.Maps"> <!--这是引用的Maps-->
<Page.BottomAppBar>
<AppBar IsOpen="True" IsSticky="True">
<StackPanel Orientation="Horizontal">
<AppBarButton Name="Location" Icon="Map" Label="Location" Click="Location_Click"/>
</StackPanel>

这篇博客介绍了如何在UWP应用中使用Location API,通过MainPage.xaml、Appxmanifest和MainPage.xaml.cs的配置与代码实现获取地理位置信息,为创建一个晴天钟应用做准备。博主提到,尽管过程中充满乐趣,他们还期待着即将到来的电钢体验。
最低0.47元/天 解锁文章
448

被折叠的 条评论
为什么被折叠?



