有没有办法摆脱 webassembly 中内容对话框的厚度?

Is there a way to get ride off the thickness ContentDialog in web assembly?

我在我的应用程序中使用 ContentDialog 作为模态,我需要去除其中的厚度,所以我不会在其中得到任何填充。通过覆盖元素的样式在 UWP 中完成它,因为这在 WASM 中不起作用是否有另一种方法可以做到这一点?

 <ContentDialog.Resources>        
    <Thickness x:Key="ContentDialogPadding">0,0,0,0</Thickness>
    <x:Double x:Key="ContentDialogMaxWidth">972</x:Double>
    <x:Double x:Key="ContentDialogMaxHeight">928</x:Double>

想要的结果(UWP):

我得到的结果(WASM):

目前 Uno Platform 不支持以这种方式覆盖单个框架资源,这将在 future Uno release

目前,使用 Uno 执行此操作的唯一方法是覆盖整个 ContentDialog 样式:

  1. 将默认 ContentDialog style 复制到您的应用中,并将其包含在 Application.Resources.MergedDictionaries 中。

  2. 修改该样式内的ContentDialogPadding属性