Skip to content

Commit fa86bc4

Browse files
committed
Cleanup code
1 parent f17ca02 commit fa86bc4

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

IPConfig/Themes/MyStyles.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
<Setter Property="ItemContainerStyle" Value="{StaticResource MyComboBoxItemStyle}" />
164164
<Setter Property="ShowClearButton" Value="{Binding IsReadOnly, RelativeSource={RelativeSource Self}, Converter={StaticResource Boolean2BooleanReConverter}}" />
165165
<Setter Property="Template" Value="{StaticResource ComboBoxEditableLeftTemplate}" />
166+
<!-- 防止光标悬停在此控件边缘时导致高亮快速闪烁。 -->
166167
<Setter Property="UseLayoutRounding" Value="False" />
167168

168169
<Setter Property="Validation.ErrorTemplate">

IPConfig/Views/IPConfigDetailView.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
<RowDefinition />
5353
</Grid.RowDefinitions>
5454

55+
<!--
56+
当光标悬停在此文本框边缘时,会导致高亮快速闪烁。
57+
通常可以通过设置 UseLayoutRounding="false" 来解决,但对此文本框无帮助。
58+
-->
5559
<hc:TextBox x:Name="tbIPConfigName"
5660
Margin="0,0,0,4"
5761
hc:InfoElement.Necessary="True"

IPConfig/Views/IPConfigListView.xaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
SelectedItem="{Binding SelectedIPConfig, Mode=TwoWay}"
6060
SelectionChanged="LbIPConfigs_SelectionChanged"
6161
SelectionMode="Extended"
62-
UseLayoutRounding="False"
6362
VirtualizingStackPanel.ScrollUnit="Pixel">
6463
<ListBox.Resources>
6564
<!--
@@ -69,8 +68,7 @@
6968
-->
7069
<ContextMenu x:Key="ItemContextMenu"
7170
d:DataContext="{Binding}"
72-
DataContext="{Binding DataContext, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}"
73-
UseLayoutRounding="True">
71+
DataContext="{Binding DataContext, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}">
7472
<MenuItem Command="{Binding CopySelectedIPConfigsAsTextCommand}"
7573
Header="{lang:Lang {x:Static lang:LangKey.CopySelectedIPConfigAsText_}}"
7674
InputGestureText="{Binding MultiSelectedCountString}" />

IPConfig/Views/NicSelectorView.xaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
hc:InfoElement.Placeholder="{Binding NicSelectorPlaceholder}"
4242
ItemsSource="{Binding AllNics}"
4343
SelectedItem="{Binding SelectedNic}"
44-
ToolTip="{Binding SelectedNic}"
45-
UseLayoutRounding="False">
44+
ToolTip="{Binding SelectedNic}">
4645
<i:Interaction.Triggers>
4746
<i:EventTrigger EventName="SelectionChanged">
4847
<i:InvokeCommandAction Command="{Binding ReadLastUsedIPv4ConfigCommand}" />
@@ -51,8 +50,7 @@
5150

5251
<hc:ComboBox.ItemTemplate>
5352
<DataTemplate DataType="{x:Type m:Nic}">
54-
<hc:SimpleStackPanel Orientation="Horizontal"
55-
UseLayoutRounding="True">
53+
<hc:SimpleStackPanel Orientation="Horizontal">
5654
<Border x:Name="NicOpStatusBorder"
5755
Padding="2"
5856
VerticalAlignment="Center"

0 commit comments

Comments
 (0)