Posted 11 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 11 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 (v24.1.2) 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.