C#WPF – 窗口中的黑线
发布时间:2020-12-15 08:22:09 所属栏目:百科 来源:网络整理
导读:在我的窗口中,小黑线. 为什么? Window x:Class="WpfPortOfTestingCamera.InputSelection" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="InputSelection" WindowStar
在我的窗口中,小黑线.
为什么? <Window x:Class="WpfPortOfTestingCamera.InputSelection" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="InputSelection" WindowStartupLocation="CenterOwner" ResizeMode="NoResize" ShowInTaskbar="False" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" SizeToContent="WidthAndHeight" d:DesignWidth="280" d:DesignHeight="206"> <StackPanel HorizontalAlignment="Center" Name="stackPanel1" VerticalAlignment="Top" Margin="10" MaxWidth="500"> <GroupBox Header="Select Camera" HorizontalAlignment="Center" VerticalAlignment="Center"> <ComboBox Height="23" Name="comboBox1" HorizontalAlignment="Center" VerticalAlignment="Center" MinWidth="120" /> </GroupBox> <Button Content="OK" Name="ButtonOK" IsDefault="True" Click="ButtonOK_Click" /> </StackPanel> </Window> 解决方法
当设置内容字符串时,窗口调整为组合框的宽度时,似乎是一个渲染工件.
如果将属性SnapsToDevicePixels =“True”添加到Window-tag,则黑线会消失. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |