MAUI发布的时候始终提示资产文件没有net8.0的目标,确保已运行还原,且net8.0已包含在项目的TargetFrameworks中
我是一个maui项目,引用了一个普通的net8.0项目,想将maui项目发布为一个windows下运行的客户端程序,但发布的时候就提示这个错误信息。调试模式或者本机使用是正常的,但是就只有发布的时候不行
在 Maui Android 项目中如何定义 Target Framework 和 Minimum Framework?
当我在下拉列表中选择可用的目标 Android 框架(Android 14.0 API 级别 34)时,它会将文件中的 XML 标记更改为 <TargetFrameworks>net8.0-ios;net8.0-android34.0</TargetFrameworks> 但是当我使用相同的文件使用 Command 行进行编译时,它会出错,因为选择了错误的框架。但是,在 Visual Studio…
Visual studio 2022 Maui 缺少 android 和 windows 依赖项
你好 我正在开发 maui 项目,并且非常确定在创建项目时我拥有所有依赖项 - android、ios、mac 和 window。今天我只注意到仅存ios、mac 两个依赖项。我怎样才能把另外两个(android和windows)找回来? 谢谢 J 此问题整理于:https://learn.microsoft.com/en-us/answers/questions/1665276/visual-studio-2022-maui-missing-android-and-window
DEP0700: Application registration failed. [0x80073CFD] Windows cannot deploy to path AppX with file system type exFAT.
我在移动硬盘里创建 MAUI 工程,随后在 VS 2022 编译器里 生成解决方案 + 部署解决方案,结果提示 DEP0700: Application registration failed. [0x80073CFD] Windows cannot deploy to path AppX with file system type exFAT. 意思貌似是不支持部署在移动硬盘为 exFAT 格式的硬盘里
How to play a web mp4 file with headers in MAUI?
I'm trying to player a web media with community's mediaelement,but there isnot any ways to set http headers. In Android, I can use the factory property in exoplayer,but in windows,I can't find any document about using winui's mediaplayer to player a…
需要在 Viewmodel 中响应搜索栏的 textchanged 事件
我的代码: xaml: <SearchBar x:Name="SearchBar" TextChanged="SearchBar_TextChanged" SearchCommand="{Binding SearchCommand}" …
Is there any way to set IndicatorStackLayout.HorizontalOptions of indicatorView to LayoutOptions.FillAndExpand?
Is there any way to set IndicatorStackLayout.HorizontalOptions of indicatorView to LayoutOptions.FillAndExpand? I wrote the following code in the constructor of MainPage.xaml.cs public MainPage() { InitializeComponent(); var sl =…
在MAUI中,如何在非Shell应用中创建并使用MenuBar?
我的应用没有使用Shell架构,也不支持使用Shell,但是我有需要实现类似VS编辑器的文件、视图、选项、设置等Menu下拉菜单,我看到MenuBar是个很好的实现,但是它貌似只能在Shell布局架构下起作用。 因此我想知道我该如何实现这一操作 在此提前感谢
通过 Intrnet 连接情况控制登录流程
我有一个 Shell <ShellContent ContentTemplate="{DataTemplate pages:StartupPage}" Shell.FlyoutBehavior="Disabled" Route="StartupPage" Shell.FlyoutItemIsVisible="False"…
如何在 MAUI 的windows平台 中清除 WebView cookie?
我正在尝试注销我们的网络视图数据。 在 Windows 中清除 MAUI 的 cookie 似乎不起作用。 我正在尝试使用这段代码: Windows.Web.Http.Filters.HttpBaseProtocolFilter myFilter = new global::Windows.Web.Http.Filters.HttpBaseProtocolFilter(); var cookieManager =…
.net Maui Android程序,使用 HttpClient 连接 web api,连接失败。但是编译为windows程序时,连接成功
1、使用 .NET Maui开发程序,读取远程服务器上面 Web Api。编译为 Windows程序时,通讯正常,但是编译为Android程序时,连接错误。 2、远程服务器上面 Web Api已经配置好了,已经使用本地浏览器连接实验过,正常,连接URL: http://47.120.72.56:81/WeatherForecast 3、编译为 windows程序时,运行正常,如图1; 4、远程连接web api的程序文件,我发到附件了,修改成立 .txt 文件。
如何获取 AlertDialog 的按钮?
我想在 AlertDialog 中自定义按钮 但我无法获取按钮 Id。 var dialog= new AlertDialog.Builder(Context).Create(); var button = dialog.GetButton(-1); 按钮 Id 从哪里获取? 此问题整理于:How to get button of AlertDialog? - Microsoft Q&A
Maui android 捏合手势容器问题
你好 我使用 Ver 17.10 preview 1 和 Android Ver 34。 我尝试添加捏合手势容器,但收到错误消息。 如下: //Error I get //MainPage.xaml : XamlC error : Failed to resolve assembly: 'PinchGesture, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' // File // MainPage.xml <?xml…
在 flylout 导航中的圆角
Hi, 在 https://github.com/dotnet/maui/issues/21576 有附示例。 为什么在 flylout 的导航中有圆形(见附图) 如何修复? 此问题整理于:https://learn.microsoft.com/en-us/answers/questions/1657094/round-in-the-navigation-of-flylou
DataTrigger使用if Else语句
你好, 我有一个图像,我想根据标签来显示和隐藏它: <Image.Triggers> <DataTrigger TargetType="Image" Binding="{Binding Source={x:Reference LabelNickname}, Path=Text}" Value="Add"> <Setter…
加载大量文本的方法。
大家好。我使用 maui 8.0, VS 17.9 预览版 和 android14 模拟器。有没有一种方法可以在不阻塞编辑器控件的情况下将大量文本加载到编辑器控件。目前我使用这个语句 editor.text = bigtext; 这会冻结应用程序。我有一个想法,当用户滚动编辑器文本时,以块的方式添加文本,应用程序将动态加载大块文本,但我不知道该怎么做。有人可以帮忙吗?谢谢。 …
将字符串列表转换为 xml,并将 xml 转换为字符串列表。
你好 我有要转换为 xml 并保存到磁盘的字符串(文件名)列表。 我想从磁盘读取此 xml 并转换为字符串列表。 我想从磁盘中删除此 xml。 提前致谢, 此问题整理于:https://learn.microsoft.com/en-us/answers/questions/1654026/convert-list-of-strings-to-xml-and-convert-the-xml
在MAUI中,如何打开一个新的窗口之后设置窗口的标题和图标?包括安卓和Windows平台
我需要在安卓设备上面打开一个新的窗口,并设置其图标和标题,类似于微信小程序的那种,但是在官方文档中我并没有看到与之相关的任何API文档,所以我想问问这是否是可能的 以及我需要如何去做?
Collectionview中的 Xaml 和column格式
我下面这个 CollectionView 的列没有正确左对齐。我怎样才能将其清理干净,使列中的标签正确对齐。谢谢! <CollectionView.ItemTemplate> <DataTemplate> <Grid WidthRequest="900" x:Name="PersItem" > <Grid.ColumnDefinitions> <ColumnDefinition…
.NET MAUI Windows 上的 WebView 如何隐藏 VerticalScrollBar?
如何在 Windows 的 WebView 中隐藏垂直滚动条? 此问题整理于:https://learn.microsoft.com/en-us/answers/questions/1338425/net-maui-webview-verticalscrollbar-windows