Problem with dynamic properties

Grids for WPF Forum

Posted 2 years ago by Ilya Smirnov
Version: 17.1.0650
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 2 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 (v2018.1 build 0675) was released 14 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.