-
<?xml version="1.0" encoding="utf-8" ?>
<FlyoutPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Kangaroo.Gui.Workbench"
xmlns:pages="clr-namespace:Kangaroo.Gui">
<FlyoutPage.Flyout>
<x:Arguments>
<pages:WorkbenchFlyout x:Name="WorkbenchFlyoutPage" />
</x:Arguments>
</FlyoutPage.Flyout>
<FlyoutPage.Detail>
<NavigationPage>
<x:Arguments>
<pages:WorkbenchDetail />
</x:Arguments>
</NavigationPage>
</FlyoutPage.Detail>
</FlyoutPage> public partial class Workbench : FlyoutPage
{
public Workbench()
{
// InitializeComponent();
this.WorkbenchFlyoutPage.MenuItemsListView.ItemSelected += ListView_ItemSelected;
}
private void ListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
{
var item = e.SelectedItem as WorkbenchFlyoutMenuItem;
if (item == null)
return;
var page = (Page)Activator.CreateInstance(item.TargetType);
page.Title = item.Title;
Detail = new NavigationPage(page);
IsPresented = false;
this.WorkbenchFlyoutPage.MenuItemsListView.SelectedItem = null;
}
} the XAML page and its class as up, compilation message show error:
Context: VS2022 Preview 4 (MAUI + WinUI3) it's a bug or invalid usage? |
Beta Was this translation helpful? Give feedback.
Answered by
taozuhong
Sep 17, 2021
Replies: 1 comment
-
the root issue is the Content page template in VS2022 Preview 4 (MAUI + WinUI3) marked as change the build action to |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
taozuhong
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the root issue is the Content page template in VS2022 Preview 4 (MAUI + WinUI3) marked as
Embedded resource
while creating.change the build action to
MauiXaml
should be OK.