|
72 | 72 | Width="{StaticResource PopupLeftRightMargin}"
|
73 | 73 | Fill="{Binding ElementName=templateRoot, Path=Background}"/>
|
74 | 74 | <Grid Grid.Column="1"
|
75 |
| - Width="{Binding ElementName=templateRoot, Path=ActualWidth}" |
| 75 | + Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type wpf:ComboBoxPopup}}, Path=VisiblePlacementWidth}" |
76 | 76 | Height="{Binding ElementName=templateRoot, Path=ActualHeight}"/>
|
77 | 77 | <Rectangle Grid.Column="2"
|
78 | 78 | MinWidth="{StaticResource PopupLeftRightMargin}"
|
|
126 | 126 | Fill="{Binding ElementName=templateRoot, Path=Background}"
|
127 | 127 | />
|
128 | 128 | <Grid Grid.Column="1"
|
129 |
| - Width="{Binding ElementName=templateRoot, Path=ActualWidth}" |
| 129 | + Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type wpf:ComboBoxPopup}}, Path=VisiblePlacementWidth}" |
130 | 130 | Height="{Binding ElementName=templateRoot, Path=ActualHeight}"/>
|
131 | 131 | <Rectangle Grid.Column="2"
|
132 | 132 | MinWidth="{StaticResource PopupLeftRightMargin}"
|
|
329 | 329 | <Setter.Value>
|
330 | 330 | <ControlTemplate TargetType="{x:Type ToggleButton}">
|
331 | 331 | <Grid>
|
332 |
| - <Border x:Name="templateRoot" |
| 332 | + <Border x:Name="ToggleTemplateRoot" |
333 | 333 | Background="{TemplateBinding Background}"
|
334 | 334 | BorderBrush="{TemplateBinding BorderBrush}"
|
335 | 335 | BorderThickness="{TemplateBinding BorderThickness}">
|
|
375 | 375 | <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
|
376 | 376 | <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false" />
|
377 | 377 | </MultiDataTrigger.Conditions>
|
378 |
| - <Setter TargetName="templateRoot" Property="BorderBrush" Value="{DynamicResource MaterialDesignCheckBoxDisabled}" /> |
| 378 | + <Setter TargetName="ToggleTemplateRoot" Property="BorderBrush" Value="{DynamicResource MaterialDesignCheckBoxDisabled}" /> |
379 | 379 | </MultiDataTrigger>
|
380 | 380 | <MultiDataTrigger>
|
381 | 381 | <MultiDataTrigger.Conditions>
|
382 | 382 | <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false" />
|
383 | 383 | <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true" />
|
384 | 384 | </MultiDataTrigger.Conditions>
|
385 |
| - <Setter TargetName="templateRoot" Property="BorderBrush" Value="{DynamicResource MaterialDesignCheckBoxDisabled}" /> |
| 385 | + <Setter TargetName="ToggleTemplateRoot" Property="BorderBrush" Value="{DynamicResource MaterialDesignCheckBoxDisabled}" /> |
386 | 386 | <Setter TargetName="splitBorder" Property="BorderBrush" Value="{DynamicResource MaterialDesignCheckBoxDisabled}" />
|
387 | 387 | </MultiDataTrigger>
|
388 | 388 | </ControlTemplate.Triggers>
|
|
412 | 412 | Margin="{TemplateBinding Padding}"
|
413 | 413 | SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
414 | 414 | UseLayoutRounding="{TemplateBinding UseLayoutRounding}">
|
415 |
| - <ContentPresenter x:Name="contentPresenter" |
416 |
| - Content="{TemplateBinding SelectionBoxItem}" |
417 |
| - ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" |
418 |
| - ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" |
419 |
| - ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" |
420 |
| - IsHitTestVisible="False"/> |
421 |
| - <TextBox x:Name="PART_EditableTextBox" |
422 |
| - IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" |
423 |
| - Style="{StaticResource MaterialDesignComboBoxEditableTextBox}" |
424 |
| - Visibility="Collapsed" /> |
425 |
| - <wpf:SmartHint x:Name="Hint" |
426 |
| - HintProxy="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static converters:HintProxyFabricConverter.Instance}}" |
427 |
| - FontSize="{TemplateBinding FontSize}" |
428 |
| - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" |
429 |
| - UseLayoutRounding="{TemplateBinding UseLayoutRounding}" |
430 |
| - UseFloating="{Binding Path=(wpf:HintAssist.IsFloating), RelativeSource={RelativeSource TemplatedParent}}" |
431 |
| - HintOpacity="{Binding Path=(wpf:HintAssist.HintOpacity), RelativeSource={RelativeSource TemplatedParent}}" |
432 |
| - Hint="{TemplateBinding wpf:HintAssist.Hint}" /> |
| 415 | + <Grid x:Name="InputRoot" |
| 416 | + HorizontalAlignment="Left"> |
| 417 | + <ContentPresenter x:Name="contentPresenter" |
| 418 | + Content="{TemplateBinding SelectionBoxItem}" |
| 419 | + ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" |
| 420 | + ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" |
| 421 | + ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" |
| 422 | + IsHitTestVisible="False"/> |
| 423 | + <TextBox x:Name="PART_EditableTextBox" |
| 424 | + IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" |
| 425 | + Style="{StaticResource MaterialDesignComboBoxEditableTextBox}" |
| 426 | + Visibility="Collapsed" /> |
| 427 | + |
| 428 | + <wpf:SmartHint x:Name="Hint" |
| 429 | + HintProxy="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static converters:HintProxyFabricConverter.Instance}}" |
| 430 | + FontSize="{TemplateBinding FontSize}" |
| 431 | + SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" |
| 432 | + UseLayoutRounding="{TemplateBinding UseLayoutRounding}" |
| 433 | + UseFloating="{Binding Path=(wpf:HintAssist.IsFloating), RelativeSource={RelativeSource TemplatedParent}}" |
| 434 | + HintOpacity="{Binding Path=(wpf:HintAssist.HintOpacity), RelativeSource={RelativeSource TemplatedParent}}" |
| 435 | + Hint="{TemplateBinding wpf:HintAssist.Hint}" /> |
| 436 | + </Grid> |
433 | 437 | </Grid>
|
434 | 438 | <wpf:Underline x:Name="Underline"
|
435 | 439 | Grid.ColumnSpan="2"
|
|
0 commit comments