Posted 6 years ago by MCRXB
Version: 12.2.0573

I'm using Themes to style the native WPF controls. It works greate except when I apply the following setter to the list box item container style. I'm using a datatemplate for the items and couldn't find any other way to make the item stretch to the width of the list box.

  <Style TargetType="ListBoxItem">
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />

 How can I use this setter and preserve the Actipro styles without duplicating the entire style inline?

Comments (1)

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

Hello, we provide all our styles via the SharedResourceKeys properties.  So you can add this to your Style tag:

BasedOn="{StaticResource {x:Static themes:SharedResourceKeys.ListBoxItemStyleKey}}"

Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 18 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.