Hello,
I have a XamDataCarousel and gave it a datasource. There are tree properties in my datasource (name, value and ishidden). I want to show name and value properties on XamDataCarousel. But if the ishidden property is true then i want the properties to be hidden or collapsed. How can i do that on tha xaml code?
<igDP:XamDataCarousel.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.Fields>
<igDP:Field Name="Name" Label="Name" >
<igDP:Field.Settings>
<igDP:FieldSettings CellMinHeight="25" CellMinWidth="64"/>
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="Value" Label="Value" >
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataCarousel.FieldLayouts>
Hello, I create a CellValuePresenter style. The name and value fields now can not be seen but there is an empty area. I want all the record (not just the fields) collapsed if the isHidden property is false. How can i do that?
<Style TargetType="{x:Type igDP:CellValuePresenter}"><Style.Triggers><DataTrigger Binding="{Binding Path=(igDP:DataRecord.DataItem).IsHidden}" Value="True"><Setter Property="Visibility" Value="Collapsed" /></DataTrigger></Style.Triggers></Style>
Do you want the whole field to be hidden/collapsed or just the specific cell? I am guessing it is the second one, so you can create a style for the CellValuePresenter and bind the VIsibility property of the CellValuePresenter to the underlying value. You would have to use a converter as well (IValueConverter) in the binding, because you will be converting bool to Visibility. Also please note, that if you are defining the field layout in the xaml, you have to include all of the fields (in this case IsHidden) even if you want to hide some of them.