|
71 | 71 | </VisualStateGroup> |
72 | 72 | </VisualStateManager.VisualStateGroups> |
73 | 73 | <Border HorizontalAlignment="Stretch" |
74 | | - VerticalAlignment="Stretch" |
75 | | - Background="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" |
76 | | - CornerRadius="{TemplateBinding wpf:TextFieldAssist.TextFieldCornerRadius}" |
77 | | - RenderTransformOrigin="0.5,0.5" |
78 | | - Visibility="{TemplateBinding wpf:TextFieldAssist.RippleOnFocusEnabled, Converter={x:Static converters:BooleanToVisibilityConverter.CollapsedInstance}}"> |
| 74 | + VerticalAlignment="Stretch" |
| 75 | + Background="{DynamicResource MaterialDesign.Brush.TextBox.HoverBackground}" |
| 76 | + CornerRadius="{TemplateBinding wpf:TextFieldAssist.TextFieldCornerRadius}" |
| 77 | + RenderTransformOrigin="0.5,0.5" |
| 78 | + Visibility="{TemplateBinding wpf:TextFieldAssist.RippleOnFocusEnabled, Converter={x:Static converters:BooleanToVisibilityConverter.CollapsedInstance}}"> |
79 | 79 | <Border.RenderTransform> |
80 | 80 | <ScaleTransform x:Name="RippleOnFocusScaleTransform" ScaleX="0" ScaleY="0" /> |
81 | 81 | </Border.RenderTransform> |
82 | 82 | </Border> |
83 | 83 | <AdornerDecorator> |
84 | 84 | <Border x:Name="OuterBorder" |
85 | | - Padding="{TemplateBinding Padding}" |
86 | | - wpf:BottomDashedLineAdorner.Brush="{TemplateBinding BorderBrush}" |
87 | | - wpf:BottomDashedLineAdorner.Thickness="{Binding RelativeSource={RelativeSource Self}, Path=BorderThickness}" |
88 | | - Background="{TemplateBinding Background}" |
89 | | - BorderBrush="{TemplateBinding BorderBrush}" |
90 | | - BorderThickness="{TemplateBinding BorderThickness}" |
91 | | - CornerRadius="{TemplateBinding wpf:TextFieldAssist.TextFieldCornerRadius}" |
92 | | - SnapsToDevicePixels="True"> |
| 85 | + Padding="{TemplateBinding Padding}" |
| 86 | + wpf:BottomDashedLineAdorner.Brush="{TemplateBinding BorderBrush}" |
| 87 | + wpf:BottomDashedLineAdorner.Thickness="{Binding RelativeSource={RelativeSource Self}, Path=BorderThickness}" |
| 88 | + Background="{TemplateBinding Background}" |
| 89 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 90 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 91 | + CornerRadius="{TemplateBinding wpf:TextFieldAssist.TextFieldCornerRadius}" |
| 92 | + SnapsToDevicePixels="True"> |
93 | 93 |
|
94 | 94 | <Grid x:Name="ContentGrid" |
95 | | - MinHeight="16" |
96 | | - VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> |
| 95 | + MinHeight="16" |
| 96 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> |
97 | 97 | <Grid.ColumnDefinitions> |
98 | 98 | <ColumnDefinition Width="Auto" /> |
99 | 99 | <ColumnDefinition Width="Auto" /> |
|
104 | 104 | </Grid.ColumnDefinitions> |
105 | 105 |
|
106 | 106 | <wpf:PackIcon x:Name="LeadingPackIcon" |
107 | | - Grid.Column="0" |
108 | | - Width="{TemplateBinding wpf:TextFieldAssist.LeadingIconSize}" |
109 | | - Height="{TemplateBinding wpf:TextFieldAssist.LeadingIconSize}" |
110 | | - Margin="0,0,6,0" |
111 | | - VerticalAlignment="{TemplateBinding wpf:TextFieldAssist.IconVerticalAlignment}" |
112 | | - Kind="{TemplateBinding wpf:TextFieldAssist.LeadingIcon}" |
113 | | - Opacity="{TemplateBinding wpf:HintAssist.HintOpacity}" |
114 | | - Visibility="{TemplateBinding wpf:TextFieldAssist.HasLeadingIcon, Converter={x:Static converters:BooleanToVisibilityConverter.CollapsedInstance}}" /> |
115 | | - |
116 | | - <TextBlock x:Name="PrefixTextBlock" |
117 | | - Grid.Column="1" |
118 | | - Margin="0,0,2,0" |
119 | | - VerticalAlignment="Center" |
120 | | - FontSize="{TemplateBinding FontSize}" |
121 | | - Opacity="{TemplateBinding wpf:HintAssist.HintOpacity}" |
122 | | - Text="{TemplateBinding wpf:TextFieldAssist.PrefixText}"> |
123 | | - <TextBlock.Visibility> |
124 | | - <MultiBinding Converter="{StaticResource PrefixSuffixTextVisibilityConverter}"> |
125 | | - <Binding ElementName="Hint" Path="IsHintInFloatingPosition" /> |
126 | | - <Binding Path="(wpf:TextFieldAssist.PrefixText)" RelativeSource="{RelativeSource TemplatedParent}" /> |
127 | | - <Binding Path="(wpf:TextFieldAssist.PrefixTextVisibility)" RelativeSource="{RelativeSource TemplatedParent}" /> |
128 | | - <Binding Path="IsKeyboardFocusWithin" RelativeSource="{RelativeSource TemplatedParent}" /> |
129 | | - <Binding Path="IsReadOnly" RelativeSource="{RelativeSource TemplatedParent}" Converter="{x:Static converters:InvertBooleanConverter.Instance}" /> |
130 | | - </MultiBinding> |
131 | | - </TextBlock.Visibility> |
132 | | - </TextBlock> |
| 107 | + Grid.Column="0" |
| 108 | + Width="{TemplateBinding wpf:TextFieldAssist.LeadingIconSize}" |
| 109 | + Height="{TemplateBinding wpf:TextFieldAssist.LeadingIconSize}" |
| 110 | + Margin="0,0,6,0" |
| 111 | + VerticalAlignment="{TemplateBinding wpf:TextFieldAssist.IconVerticalAlignment}" |
| 112 | + Kind="{TemplateBinding wpf:TextFieldAssist.LeadingIcon}" |
| 113 | + Opacity="{TemplateBinding wpf:HintAssist.HintOpacity}" |
| 114 | + Visibility="{TemplateBinding wpf:TextFieldAssist.HasLeadingIcon, Converter={x:Static converters:BooleanToVisibilityConverter.CollapsedInstance}}" /> |
133 | 115 |
|
134 | 116 | <ScrollViewer x:Name="PART_ContentHost" |
135 | 117 | Grid.Column="2" |
|
174 | 156 | <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(wpf:TextFieldAssist.PrefixTextHintBehavior)" /> |
175 | 157 | <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(wpf:TextFieldAssist.SuffixTextHintBehavior)" /> |
176 | 158 | <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="HorizontalContentAlignment" /> |
| 159 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="IsReadOnly" Converter="{x:Static converters:InvertBooleanConverter.Instance}" /> |
177 | 160 | </MultiBinding> |
178 | 161 | </wpf:SmartHint.InitialHorizontalOffset> |
179 | 162 | <wpf:SmartHint.Margin> |
|
191 | 174 | </wpf:SmartHint.Margin> |
192 | 175 | <wpf:SmartHint.Hint> |
193 | 176 | <Border x:Name="HintBackgroundBorder" |
194 | | - Background="{TemplateBinding wpf:HintAssist.Background}" |
195 | | - CornerRadius="2"> |
| 177 | + Background="{TemplateBinding wpf:HintAssist.Background}" |
| 178 | + CornerRadius="2"> |
196 | 179 | <ContentPresenter x:Name="HintWrapper" Content="{TemplateBinding wpf:HintAssist.Hint}" /> |
197 | 180 | </Border> |
198 | 181 | </wpf:SmartHint.Hint> |
199 | 182 | </wpf:SmartHint> |
200 | 183 |
|
| 184 | + <TextBlock x:Name="PrefixTextBlock" |
| 185 | + Grid.Column="1" |
| 186 | + Margin="0,0,2,0" |
| 187 | + VerticalAlignment="Center" |
| 188 | + FontSize="{TemplateBinding FontSize}" |
| 189 | + Opacity="{TemplateBinding wpf:HintAssist.HintOpacity}" |
| 190 | + Text="{TemplateBinding wpf:TextFieldAssist.PrefixText}"> |
| 191 | + <TextBlock.Visibility> |
| 192 | + <MultiBinding Converter="{StaticResource PrefixSuffixTextVisibilityConverter}"> |
| 193 | + <Binding ElementName="Hint" Path="IsHintInFloatingPosition" /> |
| 194 | + <Binding Path="(wpf:TextFieldAssist.PrefixText)" RelativeSource="{RelativeSource TemplatedParent}" /> |
| 195 | + <Binding Path="(wpf:TextFieldAssist.PrefixTextVisibility)" RelativeSource="{RelativeSource TemplatedParent}" /> |
| 196 | + <Binding Path="IsKeyboardFocusWithin" RelativeSource="{RelativeSource TemplatedParent}" /> |
| 197 | + <Binding Path="IsReadOnly" RelativeSource="{RelativeSource TemplatedParent}" Converter="{x:Static converters:InvertBooleanConverter.Instance}" /> |
| 198 | + </MultiBinding> |
| 199 | + </TextBlock.Visibility> |
| 200 | + </TextBlock> |
| 201 | + |
201 | 202 | <TextBlock x:Name="SuffixTextBlock" |
202 | | - Grid.Column="3" |
203 | | - Margin="2,0,0,0" |
204 | | - VerticalAlignment="Center" |
205 | | - FontSize="{TemplateBinding FontSize}" |
206 | | - Opacity="{TemplateBinding wpf:HintAssist.HintOpacity}" |
207 | | - Text="{TemplateBinding wpf:TextFieldAssist.SuffixText}"> |
| 203 | + Grid.Column="3" |
| 204 | + Margin="2,0,0,0" |
| 205 | + VerticalAlignment="Center" |
| 206 | + FontSize="{TemplateBinding FontSize}" |
| 207 | + Opacity="{TemplateBinding wpf:HintAssist.HintOpacity}" |
| 208 | + Text="{TemplateBinding wpf:TextFieldAssist.SuffixText}"> |
208 | 209 | <TextBlock.Visibility> |
209 | 210 | <MultiBinding Converter="{StaticResource PrefixSuffixTextVisibilityConverter}"> |
210 | 211 | <Binding ElementName="Hint" Path="IsHintInFloatingPosition" /> |
|
288 | 289 | CornerRadius="{TemplateBinding wpf:TextFieldAssist.UnderlineCornerRadius}" |
289 | 290 | Visibility="{TemplateBinding wpf:TextFieldAssist.DecorationVisibility}" /> |
290 | 291 |
|
291 | | - <Canvas VerticalAlignment="Bottom" |
292 | | - IsHitTestVisible="False"> |
| 292 | + <Canvas VerticalAlignment="Bottom" IsHitTestVisible="False"> |
293 | 293 | <Border Canvas.Top="2" |
294 | | - Padding="{TemplateBinding Padding, Converter={StaticResource HelperTextMarginConverter}}" |
295 | | - Width="{Binding ActualWidth, ElementName=OuterBorder}"> |
| 294 | + Padding="{TemplateBinding Padding, Converter={StaticResource HelperTextMarginConverter}}" |
| 295 | + Width="{Binding ActualWidth, ElementName=OuterBorder}"> |
296 | 296 | <Grid x:Name="FooterGrid"> |
297 | 297 | <Grid.ColumnDefinitions> |
298 | 298 | <ColumnDefinition /> |
|
0 commit comments