I would like to add a AutoSuggestBox
in the CommandBar
. However the following code does not make the AutoSuggestBox
stretch. I tried setting the HorizontalContentAlignment="Stretch"
and HorizontalAlignment="Stretch"
, but it has no impact. What am I missing?
<CommandBar Grid.Row="0" HorizontalContentAlignment="Stretch">
<CommandBar.Content>
<AutoSuggestBox HorizontalAlignment="Stretch" Margin="8 8 8 4" PlaceholderText="Search podcasts" QueryIcon="Find">
<Interactivity:Interaction.Behaviors>
<Core:EventTriggerBehavior EventName="QuerySubmitted">
<Core:InvokeCommandAction
Command="{Binding SearchCommand}"
InputConverter="{StaticResource QueryArgsConverter}" />
</Core:EventTriggerBehavior>
</Interactivity:Interaction.Behaviors>
</AutoSuggestBox>
</CommandBar.Content>
</CommandBar>