Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I believe you would need to create a custom style for your combobox and redefine its PopUp section. Pls check here: <a href="http://msdn.microsoft.com/en-us/library/ms752094.aspx" rel="nofollow noreferrer">ComboBox ControlTemplate Example</a> for details on how to customize style for the wpf combobox. Your new Popup section could look like the one below:</p> <pre><code>&lt;Window.Resources&gt; ... &lt;Style x:Key="{x:Type ComboBox}" TargetType="ComboBox"&gt; ... &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="ComboBox"&gt; &lt;Grid&gt; &lt;ToggleButton ...&gt; &lt;/ToggleButton&gt; &lt;ContentPresenter ... /&gt; &lt;TextBox x:Name="PART_EditableTextBox" .../&gt; &lt;Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Slide"&gt; &lt;Grid Name="DropDown" SnapsToDevicePixels="True" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}"&gt; &lt;Border x:Name="DropDownBorder" Background="{StaticResource WindowBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource SolidBorderBrush}"/&gt; &lt;TabControl&gt; &lt;TabItem Header="Google"&gt; &lt;ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True"&gt; &lt;StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" /&gt; &lt;/ScrollViewer&gt; &lt;/TabItem&gt; &lt;TabItem Header="Bing"&gt; &lt;ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True"&gt; &lt;StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" /&gt; &lt;/ScrollViewer&gt; &lt;/TabItem&gt; &lt;TabItem Header="Computer"&gt; &lt;ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True"&gt; &lt;StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" /&gt; &lt;/ScrollViewer&gt; &lt;/TabItem&gt; &lt;/TabControl&gt; &lt;/Grid&gt; &lt;/Popup&gt; &lt;/Grid&gt; &lt;ControlTemplate.Triggers&gt; ... &lt;/ControlTemplate.Triggers&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;Style.Triggers&gt; ... &lt;/Style.Triggers&gt; &lt;/Style&gt; ... &lt;/Window.Resources&gt; </code></pre> <p>hope this helps, regards</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload