|
71 | 71 | <Popup IsOpen="True" AllowsTransparency="True" Placement="RelativePoint" HorizontalOffset="0" VerticalOffset="0"
|
72 | 72 | PlacementTarget="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGridCell}}}"
|
73 | 73 | PopupAnimation="Fade">
|
74 |
| - <Border Padding="16" Background="{DynamicResource MaterialDesignPaper}" CornerRadius="2" |
75 |
| - Margin="5,5,5,5" |
76 |
| - BorderBrush="{DynamicResource MaterialDesignDivider}" Effect="{StaticResource MaterialDesignShadowDepth2}" |
77 |
| - BorderThickness="1"> |
78 |
| - <Grid> |
79 |
| - <Grid.RowDefinitions> |
80 |
| - <RowDefinition Height="Auto" /> |
81 |
| - <RowDefinition Height="Auto" /> |
82 |
| - </Grid.RowDefinitions> |
83 |
| - <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" |
84 |
| - Padding="0 -1 0 3"> |
85 |
| - <Grid> |
86 |
| - <ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" |
87 |
| - /> |
88 |
| - <TextBlock Text="{Binding Path=(wpf:TextFieldAssist.Hint), RelativeSource={RelativeSource TemplatedParent}}" |
89 |
| - Visibility="{TemplateBinding Text, Converter={StaticResource TextFieldHintVisibilityConverter}}" |
90 |
| - MinWidth="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGridCell}}, Path=ActualWidth}" |
91 |
| - x:Name="Hint" |
92 |
| - Margin="1 0 1 0" |
93 |
| - Opacity="{Binding Path=(wpf:TextFieldAssist.HintOpacity), RelativeSource={RelativeSource TemplatedParent}}"/> |
94 |
| - </Grid> |
95 |
| - </Border> |
96 |
| - <TextBlock Grid.Row="1" HorizontalAlignment="Right" Opacity=".56" Visibility="{TemplateBinding MaxLength, Converter={StaticResource NotZeroToVisibilityConverter}}"> |
97 |
| - <TextBlock.Text> |
98 |
| - <MultiBinding StringFormat="{}{0}/{1}"> |
99 |
| - <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Text.Length" /> |
100 |
| - <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="MaxLength" /> |
101 |
| - </MultiBinding> |
102 |
| - </TextBlock.Text> |
103 |
| - </TextBlock> |
104 |
| - </Grid> |
105 |
| - </Border> |
| 74 | + <Grid> |
| 75 | + <Border Background="{DynamicResource MaterialDesignPaper}" CornerRadius="2" |
| 76 | + Margin="5,5,5,5" |
| 77 | + Effect="{StaticResource MaterialDesignShadowDepth2}" |
| 78 | + BorderThickness="1" /> |
| 79 | + <Border Padding="16" Background="Transparent" CornerRadius="2" |
| 80 | + Margin="5,5,5,5" |
| 81 | + BorderBrush="{DynamicResource MaterialDesignDivider}" |
| 82 | + BorderThickness="1"> |
| 83 | + <Grid> |
| 84 | + <Grid.RowDefinitions> |
| 85 | + <RowDefinition Height="Auto" /> |
| 86 | + <RowDefinition Height="Auto" /> |
| 87 | + </Grid.RowDefinitions> |
| 88 | + <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" |
| 89 | + Padding="0 -1 0 3"> |
| 90 | + <Grid> |
| 91 | + <ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" |
| 92 | + /> |
| 93 | + <TextBlock Text="{Binding Path=(wpf:TextFieldAssist.Hint), RelativeSource={RelativeSource TemplatedParent}}" |
| 94 | + Visibility="{TemplateBinding Text, Converter={StaticResource TextFieldHintVisibilityConverter}}" |
| 95 | + MinWidth="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGridCell}}, Path=ActualWidth}" |
| 96 | + x:Name="Hint" |
| 97 | + Margin="1 0 1 0" |
| 98 | + Opacity="{Binding Path=(wpf:TextFieldAssist.HintOpacity), RelativeSource={RelativeSource TemplatedParent}}"/> |
| 99 | + </Grid> |
| 100 | + </Border> |
| 101 | + <TextBlock Grid.Row="1" HorizontalAlignment="Right" Opacity=".56" Visibility="{TemplateBinding MaxLength, Converter={StaticResource NotZeroToVisibilityConverter}}"> |
| 102 | + <TextBlock.Text> |
| 103 | + <MultiBinding StringFormat="{}{0}/{1}"> |
| 104 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Text.Length" /> |
| 105 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="MaxLength" /> |
| 106 | + </MultiBinding> |
| 107 | + </TextBlock.Text> |
| 108 | + </TextBlock> |
| 109 | + </Grid> |
| 110 | + </Border> |
| 111 | + </Grid> |
106 | 112 | </Popup>
|
107 | 113 | </Grid>
|
108 | 114 | </ControlTemplate>
|
|
0 commit comments