Posted 11 years ago by MCRXB
Version: 12.2.0573
Avatar

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.

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

 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
Avatar

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 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.