如何在组合框内的弹出窗口滚动条上显示文本框控件,这是WPF ComboBox with checkboxes and textbox with search field的延续
我也想在文本框和绑定的组合框项目之间显示行距
<Popup
Name="Popup"
Placement="Bottom"
AllowsTransparency="True"
Focusable="False" IsOpen="{TemplateBinding IsDropDownOpen}"
PopupAnimation="Slide">
<Grid
Name="DropDown"
SnapsToDevicePixels="True"
MinWidth="{TemplateBinding ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border
x:Name="DropDownBorder"
BorderThickness="1" Background="White"
BorderBrush="Black"/>
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True" DataContext="{Binding}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBox />
<StackPanel Grid.Row="1" IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
</Grid>
</ScrollViewer>
</Grid>
答案 0 :(得分:1)
尝试将{
"session": "projects\/verifier-26084\/agent\/sessions\/1gg5b76c37f7111b",
"queryParams":
{
"contexts": [
{
"name": "projects\/verifier-26084\/agent\/sessions\/1gg5b76c37f7111b\/contexts\/ask-children",
"lifespanCount": 1
}]
},
"queryInput":
{
"text":
{
"text": "\u0442\u0440\u0438",
"languageCode": "ru-RU"
}
}
}
与ScrollViewer
放在同一Grid
中,但放在另一行中,例如:
TextBox