c# - WPF 表单应用程序与设计器中的属性不同
问题描述
我正在学习如何使用 Visual Studio 2019 创建 wpf 控件(和窗口)。作为第一步,我尝试生成一个内部带有标签的窗口。使用以下代码,它看起来像这样(设计器窗口)
<Window x:Name="Ventana" x:Class="PhanUtils.Sistema.Recursos.Ventanas.Mensaje"
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:PhanUtils.Sistema.Recursos.Ventanas"
Width="580" Height="175" MinWidth="580" MinHeight="175" MaxWidth="580" MaxHeight="175"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
HorizontalAlignment="Center">
<Grid>
<Label x:Name="L_Informacion" Content="Label" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="554" Height="126" BorderBrush="#FFCF1E1E" BorderThickness="5"/>
</Grid>
</Window>
但是,当我运行应用程序并显示相同的对话框时,它看起来像这样:
有人知道我为什么会遇到这个问题吗?
解决方案
推荐阅读
- flutter - 在构建中获取 context.read() 功能
- vb6 - 将 DateValue() 与 datetime2 一起使用时类型不匹配
- azure - 更新私有 DNS 后需要重新创建应用程序网关规则
- react-native - 如何确定文档是否从 PouchDB 同步到 CouchDB?
- sql - 有没有办法在 Big Query 的滚动窗口上使用 percentile_cont() 函数计算百分位数?
- cognos - 要传递给 SQL 的 Cognos Static 提示值
- javascript - 在链式承诺的每一步评估价值并打破承诺
- python - 从 csv 文件中取出一列并将其放入 python 中的列表中
- r - 使用 if 语句将两个数据帧连接在一起
- bloomberg - from xbbg import blp 适用于股票,但不适用于债券