MAUI 设置启动页

<Shell
    x:Class="Squirrel.Batch.Copy.AppShell"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:local="clr-namespace:Squirrel.Batch.Copy.View"
    Shell.FlyoutBehavior="Disabled"
    Title="Squirrel.Batch.Copy">

    <ShellContent
        Title="Home"
        ContentTemplate="{DataTemplate local:BulkCopyPage}"
        Route="View/BulkCopyPage" />

</Shell>

如上代码:

xmlns:local 指定页面所在命名空间

内容模版指定显示模版的名称,同时路由要指向Page的路径。

posted @ 2024-06-24 15:36  每周报  阅读(5)  评论(0编辑  收藏  举报