2025年6月15日
摘要: 更新Shell扩展,新增弹窗功能。https://www.cnblogs.com/dalgleish/p/18920441 BasicDialogBox.xaml代码,简单一个按钮,用于弹出对话框。 <?xml version="1.0" encoding="utf-8" ?> <ContentPa 阅读全文
posted @ 2025-06-15 10:13 dalgleish 阅读(19) 评论(0) 推荐(0)
摘要: 之前已经说过,使用MauiCommunityToolkit包了。这里不再累述。 SimpleDock.xaml代码 <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dot 阅读全文
posted @ 2025-06-15 05:07 dalgleish 阅读(13) 评论(0) 推荐(0)
摘要: SimpleWrap.xaml对应代码 <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas 阅读全文
posted @ 2025-06-15 01:08 dalgleish 阅读(11) 评论(0) 推荐(0)
摘要: SimpleStack.xaml代码 <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas. 阅读全文
posted @ 2025-06-15 00:51 dalgleish 阅读(13) 评论(0) 推荐(0)
  2025年6月14日
摘要: 这个例子里面用Button作为菜单,写了很多例子,我们先把菜单和跳转写好,之后一个例子一个例子添加。 在AppShell.cs中添加 this.Navigate("MauiViews.MauiDemos.Book._03.LayoutPanels"); LayoutPanels.xaml代码 <?x 阅读全文
posted @ 2025-06-14 14:45 dalgleish 阅读(18) 评论(0) 推荐(0)
摘要: AppShell中添加 this.Navigate("MauiViews.MauiDemos.Book._02.Xaml2009"); Xaml2009.xaml代码 <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http:/ 阅读全文
posted @ 2025-06-14 10:47 dalgleish 阅读(13) 评论(0) 推荐(0)
  2025年6月13日
摘要: 老规矩,在AppShell.xaml.cs代码中,添加一行代码,把这个demo加到导航栏中。 this.Navigate("MauiViews.MauiDemos.Book._02.NonCompiledXaml"); 因为要使用到CommunityToolkit中的DockLayout,所以请在N 阅读全文
posted @ 2025-06-13 13:29 dalgleish 阅读(11) 评论(0) 推荐(0)
摘要: 请务必写好Shell扩展类的公共代码,之后不再强调,随时可能会更新Shell扩展类。https://www.cnblogs.com/dalgleish/p/18920441 Maui因为采用MVVM模式,所以不再有Window这个类了,当然也不需要了。现在我们创建一个ContentPage的Eigh 阅读全文
posted @ 2025-06-13 12:50 dalgleish 阅读(18) 评论(0) 推荐(0)
  2025年6月9日
摘要: 代码简化了增加左侧的导航栏,跳转等。之后例子功能,都会基于此扩展。 using CommunityToolkit.Maui.Extensions; using Microsoft.Maui.Controls; using Microsoft.Maui.Controls.PlatformConfigu 阅读全文
posted @ 2025-06-09 11:29 dalgleish 阅读(52) 评论(0) 推荐(0)
  2025年6月1日
摘要: MAUI是基于MVVM模式的UI开发,是WPF的跨平台实现,基本可以无缝把项目转到MAUI里。 配置非常简单,如下图。 因为此教程是基于《WPF编程宝典C#2012 第4版》实现的,所以为了方便书中各种demo的显示,请大家按照以下步骤添加公用代码。 1. 项目建立三个项目,其中MauiViews是 阅读全文
posted @ 2025-06-01 02:29 dalgleish 阅读(213) 评论(0) 推荐(0)