Styling COmboBox in PropertyGrid

Grids for WPF Forum

Posted 6 years ago by Jack Stephenson
Version: 14.1.0602
Platform: .NET 4.5
Environment: Windows 8 (64-bit)
Avatar

I created a customer propertyeditor that incorporates a combobox.

The combobox isn't styled quite the same way as the default combobox that you autogen.

For example I am using metrodark and my combobox sticks out because it is lighter than everything else whereas yours belnds in.

What style can I apply?

-----

JES

Comments (5)

Posted 6 years ago by Jack Stephenson
Avatar

Sorry this isnt a bug. Just askin for help

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Jack,

If you have a custom Style for it, you could have your style be based on ours by putting this in the Style.BasedOn attribute:

{StaticResource {x:Static themes:SharedResourceKeys.ComboBoxStyleKey}}

Or if you don't have a custom Style, you could just set that directly to the ComboBox.Style property.  Or a third option would be to enable native control themes via our Themes system (see documentation for how).


Actipro Software Support

Posted 6 years ago by Jack Stephenson
Avatar

YOu aren't answring my question.

YOu autogen comboboxes for PropertyGrid.Post Comment

WHat sty;e do you use.

I want to use the same style.

What is it????

JES

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Jack,

For the ComboBox controls in our default property editors, we don't use a custom style.  Most just are defined like this:

<ComboBox x:Name="comboBox" Margin="0" Padding="0"
  HorizontalContentAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0"
  Background="Transparent" IsEditable="true">


Actipro Software Support

Posted 6 years ago by Jack Stephenson
Avatar

great answer

The latest build of this product (v2019.1 build 0683) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.