|
8 | 8 | <converters:BooleanToVisibilityConverter x:Key="InverseBoolToVisConverter"
|
9 | 9 | FalseValue="Visible"
|
10 | 10 | TrueValue="Collapsed" />
|
11 |
| - <converters:FloatingHintTransformConverter x:Key="FloatingHintCanvasTransformConverter" ApplyScaleTransform="False" /> |
| 11 | + <converters:FloatingHintTransformConverter x:Key="FloatingHintClippingGridTransformConverter" ApplyScaleTransform="False" /> |
12 | 12 | <converters:FloatingHintTransformConverter x:Key="FloatingHintTransformConverter" ApplyTranslateTransform="False" />
|
13 | 13 | <converters:FloatingHintTextBlockMarginConverter x:Key="FloatingHintTextBlockMarginConverter" />
|
14 | 14 | <system:Double x:Key="NoContentFloatingScale">1.0</system:Double>
|
|
140 | 140 | </VisualStateGroup>
|
141 | 141 | </VisualStateManager.VisualStateGroups>
|
142 | 142 | <wpf:ScaleHost x:Name="ScaleHost" />
|
143 |
| - <Canvas ClipToBounds="True" HorizontalAlignment="Stretch" Height="{Binding ElementName=FloatingHintTextBlock, Path=ActualHeight}"> |
144 |
| - <Canvas.RenderTransform> |
145 |
| - <MultiBinding Converter="{StaticResource FloatingHintCanvasTransformConverter}"> |
| 143 | + <Grid ClipToBounds="True"> |
| 144 | + <Grid.RenderTransform> |
| 145 | + <MultiBinding Converter="{StaticResource FloatingHintClippingGridTransformConverter}"> |
146 | 146 | <Binding ElementName="ScaleHost" Path="Scale" />
|
147 | 147 | <Binding Path="FloatingScale" RelativeSource="{RelativeSource TemplatedParent}" />
|
148 | 148 | <Binding Source="{StaticResource NoContentFloatingScale}" />
|
149 | 149 | <Binding Path="FloatingOffset" RelativeSource="{RelativeSource TemplatedParent}" />
|
150 | 150 | </MultiBinding>
|
151 |
| - </Canvas.RenderTransform> |
152 |
| - <ContentControl x:Name="FloatingHintTextBlock" |
| 151 | + </Grid.RenderTransform> |
| 152 | + <Canvas HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="{Binding ElementName=FloatingHintTextBlock, Path= ActualWidth}" Height="{Binding ElementName=FloatingHintTextBlock, Path=ActualHeight}"> |
| 153 | + <ContentControl x:Name="FloatingHintTextBlock" |
153 | 154 | HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
154 | 155 | VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
155 | 156 | Content="{TemplateBinding Hint}"
|
|
160 | 161 | Opacity="{TemplateBinding HintOpacity}"
|
161 | 162 | RenderTransformOrigin="0,0"
|
162 | 163 | Visibility="{TemplateBinding UseFloating, Converter={StaticResource BoolToVisConverter}}">
|
163 |
| - <ContentControl.Margin> |
164 |
| - <MultiBinding Converter="{StaticResource FloatingHintTextBlockMarginConverter}"> |
165 |
| - <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(wpf:HintAssist.FloatingHintHorizontalAlignment)" /> |
166 |
| - <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="HorizontalContentAlignment" /> |
167 |
| - <Binding RelativeSource="{RelativeSource Self}" Path="ActualWidth" /> |
168 |
| - <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ActualWidth" /> |
169 |
| - <Binding ElementName="ScaleHost" Path="Scale" /> |
170 |
| - <Binding Path="FloatingScale" RelativeSource="{RelativeSource TemplatedParent}" /> |
171 |
| - <Binding Source="{StaticResource NoContentFloatingScale}" /> |
172 |
| - </MultiBinding> |
173 |
| - </ContentControl.Margin> |
174 |
| - <ContentControl.Tag> |
175 |
| - <system:Double>0.0</system:Double> |
176 |
| - </ContentControl.Tag> |
177 |
| - <ContentControl.RenderTransform> |
178 |
| - <MultiBinding Converter="{StaticResource FloatingHintTransformConverter}"> |
179 |
| - <Binding ElementName="ScaleHost" Path="Scale" /> |
180 |
| - <Binding Path="FloatingScale" RelativeSource="{RelativeSource TemplatedParent}" /> |
181 |
| - <Binding Source="{StaticResource NoContentFloatingScale}" /> |
182 |
| - <Binding Path="FloatingOffset" RelativeSource="{RelativeSource TemplatedParent}" /> |
183 |
| - </MultiBinding> |
184 |
| - </ContentControl.RenderTransform> |
185 |
| - </ContentControl> |
186 |
| - </Canvas> |
| 164 | + <ContentControl.Margin> |
| 165 | + <MultiBinding Converter="{StaticResource FloatingHintTextBlockMarginConverter}"> |
| 166 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(wpf:HintAssist.FloatingHintHorizontalAlignment)" /> |
| 167 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="HorizontalContentAlignment" /> |
| 168 | + <Binding RelativeSource="{RelativeSource Self}" Path="ActualWidth" /> |
| 169 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ActualWidth" /> |
| 170 | + <Binding ElementName="ScaleHost" Path="Scale" /> |
| 171 | + <Binding Path="FloatingScale" RelativeSource="{RelativeSource TemplatedParent}" /> |
| 172 | + <Binding Source="{StaticResource NoContentFloatingScale}" /> |
| 173 | + </MultiBinding> |
| 174 | + </ContentControl.Margin> |
| 175 | + <ContentControl.Tag> |
| 176 | + <system:Double>0.0</system:Double> |
| 177 | + </ContentControl.Tag> |
| 178 | + <ContentControl.RenderTransform> |
| 179 | + <MultiBinding Converter="{StaticResource FloatingHintTransformConverter}"> |
| 180 | + <Binding ElementName="ScaleHost" Path="Scale" /> |
| 181 | + <Binding Path="FloatingScale" RelativeSource="{RelativeSource TemplatedParent}" /> |
| 182 | + <Binding Source="{StaticResource NoContentFloatingScale}" /> |
| 183 | + <Binding Path="FloatingOffset" RelativeSource="{RelativeSource TemplatedParent}" /> |
| 184 | + </MultiBinding> |
| 185 | + </ContentControl.RenderTransform> |
| 186 | + </ContentControl> |
| 187 | + </Canvas> |
| 188 | + </Grid> |
187 | 189 | </Grid>
|
188 | 190 | </ControlTemplate>
|
189 | 191 | </Setter.Value>
|
|
0 commit comments