Problem with dynamic properties

Grids for WPF Forum

Posted 8 years ago by Ilya Smirnov
Version: 17.1.0650
Platform: .NET 4.5
Environment: Windows 10 (64-bit)
Avatar

There is a problem with category title when using the following code from your PropertyGridDynamicProperties sample.

<grids:PropertyGrid.ItemContainerStyle>
        <Style TargetType="grids:PropertyGridItem">
            <Setter Property="Visibility" Value="{Binding IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}" />
        </Style>
</grids:PropertyGrid.ItemContainerStyle>

 Screenshot

Comments (1)

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

Hi Ilya,

Thanks for reporting this.  We have restructured some internal code for the next maintenance release that will allow this to work by using code below instead:

<grids:PropertyGrid.ItemContainerStyleSelector>
	<grids:PropertyGridItemStyleSelector>
		<grids:PropertyGridItemStyleSelector.PropertyStyle>
			<Style TargetType="grids:PropertyGridItem">
				<Setter Property="Visibility" Value="{Binding IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}" />
			</Style>
		</grids:PropertyGridItemStyleSelector.PropertyStyle>
	</grids:PropertyGridItemStyleSelector>
</grids:PropertyGrid.ItemContainerStyleSelector>

Note that we use an ItemContainerStyleSelector for picking the PropertyGridItem Style because it can be one of three styles (category, category editor, or property).  By using the code above (starting in build 651 only), it will allow you to alter the property style while leaving the others in tact.

We're not sure when build 651 will be ready for release since 650 just came out, but if you'd like to test a preview build, please write our support address and reference this thread in your email.


Actipro Software Support

The latest build of this product (v24.1.3) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.