-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Description
Bug explanation
Currently consumers can't alter the HorizontalContentAlignment of the ListBox in the AutoSuggestBox:
Should be self-explanatory, but here is the (non-minimal) repro:
<materialDesign:AutoSuggestBox Margin="{StaticResource DefaultSpacing}"
HorizontalAlignment="Stretch"
materialDesign:HintAssist.Hint="Username or E-Mail"
materialDesign:TextFieldAssist.HasLeadingIcon="True"
materialDesign:TextFieldAssist.LeadingIcon="User"
DropDownBackground="{DynamicResource MaterialDesign.Brush.ToolBar.Background}"
DropDownElevation="Dp24"
DropDownMaxHeight="500"
Suggestions="{Binding EmailSuggestions}"
Text="{Binding Email, UpdateSourceTrigger=PropertyChanged}">
<materialDesign:AutoSuggestBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding LoginCommand}" />
</materialDesign:AutoSuggestBox.InputBindings>
<materialDesign:AutoSuggestBox.ItemTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch" utils:GridAssist.Columns="*, auto" Background="Fuchsia">
<TextBlock Grid.Column="0" Text="{Binding .}" VerticalAlignment="Center" />
<Button Grid.Column="1"
Padding="2,0,0,0"
Command="{Binding DataContext.RemoveSuggestion, RelativeSource={RelativeSource AncestorType=UserControl}}"
Focusable="False"
Style="{StaticResource MaterialDesignToolButton}">
<materialDesign:PackIcon Width="16"
Height="16"
Margin="0"
Kind="CloseCircle" />
</Button>
</Grid>
</DataTemplate>
</materialDesign:AutoSuggestBox.ItemTemplate>
</materialDesign:AutoSuggestBox>Version
5.3.0-ci1132