我正在使用xaml并试图弄清楚如何修复帧错误。我看到对话框并不完全适合窗框。请看下面的链接。
代码如下:
Full Code: <Page x:Class="ccf_envcheck.Pages.HomePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ccf_envcheck"
mc:Ignorable="d"
d:DesignHeight="380"
Title="HomePage" Width="340.976" >
<StackPanel>
<TextBlock Text = ". . . " Height="50" Width="300" Margin = "10" TextWrapping="Wrap" FontWeight="Bold" Foreground="White" VerticalAlignment="Stretch"/>
<TextBlock Text = ". . . " Height="50" Width="300" Margin = "0" TextWrapping="Wrap" FontWeight="Bold" Foreground="White" VerticalAlignment="Stretch" />
<Button Click="FirstDevice" Content="First Device" Margin="10,15,14,1"/>
<Button Click="SecondDevice" Content="Second Device" Margin="10,15,14,1"/>
</StackPanel>
</Page>
答案 0 :(得分:0)
如果你在Page initalizing属性中看到你的代码,你已经将宽度硬编码为340.986,我认为这就是为什么Frame和Dialogue框没有相同的宽度。你能尝试删除它并检查它是否有效。希望这有帮助!