Skip to content

Commit 45cdd25

Browse files
Merge pull request #3194 from deanchalk/master
#3185 - Oddness with Theming and Selection in InfiniteCanvas Control
2 parents adf771e + 21d3d21 commit 45cdd25

File tree

2 files changed

+5
-21
lines changed

2 files changed

+5
-21
lines changed

Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/Controls/InfiniteCanvasTextBox.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,6 @@ protected override void OnApplyTemplate()
3535
_editZone.TextChanged -= EditZone_TextChanged;
3636
_editZone.TextChanged += EditZone_TextChanged;
3737
_editZone.FontSize = FontSize;
38-
_editZone.SelectionHighlightColorWhenNotFocused.Color = Color.FromArgb(
39-
1,
40-
_editZone.SelectionHighlightColor.Color.R,
41-
_editZone.SelectionHighlightColor.Color.G,
42-
_editZone.SelectionHighlightColor.Color.B);
43-
_editZone.SelectionHighlightColorWhenNotFocused.Opacity = .1;
44-
45-
_editZone.SelectionHighlightColor.Color =
46-
Color.FromArgb(
47-
1,
48-
_editZone.SelectionHighlightColor.Color.R,
49-
_editZone.SelectionHighlightColor.Color.G,
50-
_editZone.SelectionHighlightColor.Color.B);
51-
52-
_editZone.SelectionHighlightColor.Opacity = .1;
53-
5438
base.OnApplyTemplate();
5539
}
5640

Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
</InkToolbarCustomToolButton>
3030
</InkToolbar>
3131

32-
<StackPanel Background="{ThemeResource SystemChromeMediumColor}"
32+
<StackPanel Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}"
3333
Orientation="Horizontal">
3434
<Grid Width="2"
3535
Height="48"
36-
Background="{ThemeResource SystemListMediumColor}" />
36+
Background="{ThemeResource SystemControlBackgroundListMediumBrush}" />
3737
<Button x:Name="EraseAllButton"
3838
Style="{StaticResource CanvasTextBoxButtonStyle}"
3939
ToolTipService.ToolTip="Erase All">
@@ -57,7 +57,7 @@
5757
</Button>
5858
</StackPanel>
5959
<StackPanel x:Name="CanvasTextBoxTools"
60-
Background="{ThemeResource SystemChromeMediumColor}"
60+
Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}"
6161
Orientation="Horizontal"
6262
Visibility="Collapsed">
6363
<Grid Width="2"
@@ -157,14 +157,14 @@
157157
TargetType="ToggleButton">
158158
<Setter Property="Width" Value="48" />
159159
<Setter Property="Height" Value="48" />
160-
<Setter Property="Background" Value="{ThemeResource SystemChromeMediumColor}" />
160+
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundChromeMediumBrush}" />
161161
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
162162
</Style>
163163
<Style x:Key="CanvasTextBoxButtonStyle"
164164
TargetType="Button">
165165
<Setter Property="Width" Value="48" />
166166
<Setter Property="Height" Value="48" />
167-
<Setter Property="Background" Value="{ThemeResource SystemChromeMediumColor}" />
167+
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundChromeMediumBrush}" />
168168
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
169169
</Style>
170170

0 commit comments

Comments
 (0)