6
私のウィンドウでは、細い黒線です。 なぜですか?C#WPF - 黒い線のウィンドウ
<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"を使用することの欠点はありますか? – Hooch
実際には分かりませんが、パフォーマンスには何らかの影響が出る可能性があります。 –
欠点は、SnapToDevicePixelsをビジュアルツリーノードの一部にのみ配置すると、他のピクセルがまだサブピクセル位置にレンダリングされている可能性があることです。これは、オブジェクトのアライメントを互いに傷つけることになります。私はUseLayoutRoundingを使ってこれを渡す記事を書いた:http://net-fx.blogspot.com/2011/04/getting-crisp-back-into-your-wpf-apps.html ... HTH –