Skip to content

Commit 2efdd84

Browse files
committed
Add Watermark template and corresponding ContentControl to DatePickerTextBox
1 parent 5434628 commit 2efdd84

File tree

1 file changed

+12
-3
lines changed
  • src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles

1 file changed

+12
-3
lines changed

src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/DatePicker.xaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,18 @@
4646
<Setter Property="Template">
4747
<Setter.Value>
4848
<ControlTemplate TargetType="{x:Type DatePickerTextBox}">
49-
<Border Margin="{TemplateBinding Margin}">
50-
<Decorator x:Name="PART_ContentHost" Margin="{TemplateBinding Padding}" />
51-
</Border>
49+
<Grid>
50+
<Border>
51+
<ContentControl x:Name="PART_Watermark"
52+
Opacity="0"
53+
Focusable="False"
54+
IsHitTestVisible="False"
55+
Padding="2"/>
56+
</Border>
57+
<Border Margin="{TemplateBinding Margin}">
58+
<Decorator x:Name="PART_ContentHost" Margin="{TemplateBinding Padding}" />
59+
</Border>
60+
</Grid>
5261
</ControlTemplate>
5362
</Setter.Value>
5463
</Setter>

0 commit comments

Comments
 (0)