My XamDataCards is populated via DataSource with very different values. So I cannot set manually width and height for Cells.I tried to AutoArrange them but with no result. What I need is to set auto for width and height with possibility to wrap long text in cell. Below is my present code.
<igDP:XamDataCards Name="ZamowieniaDoWeryfikacji" Theme="LunaOlive" FontSize="12" FontFamily="Segoe UI" Background="White" BorderBrush="Black" BorderThickness="1"> <igDP:XamDataCards.ViewSettings> <igDP:CardViewSettings HeaderPath="idZamowienia" AutoFitCards="Horizontally" AllowCardHeightResizing="True" AllowCardWidthResizing="True" MaxCardCols="1" OverridesDefaultStyle="True" Padding="5" ShouldCollapseCards="False" Orientation="Horizontal" /> </igDP:XamDataCards.ViewSettings>
<igDP:XamDataCards.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoGenerateFields="False" AllowAddNew="False" AllowDelete="False" /> </igDP:XamDataCards.FieldLayoutSettings> <igDP:XamDataCards.FieldLayouts> <igDP:FieldLayout > <igDP:FieldLayout.Settings> <igDP:FieldLayoutSettings AllowAddNew="False" AllowDelete="False" HighlightPrimaryField="Highlight" /> </igDP:FieldLayout.Settings> <igDP:FieldLayout.FieldSettings> <igDP:FieldSettings AllowEdit="False" AllowRecordFiltering="True" /> </igDP:FieldLayout.FieldSettings> <igDP:Field Name="Klient"> <igDP:Field.Settings> <igDP:FieldSettings LabelPresenterStyle="{Binding Source={StaticResource hiddenLabel}}" Width="450" /> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="Opis" ColumnSpan="2"> <igDP:Field.Settings> <igDP:FieldSettings LabelPresenterStyle="{Binding Source={StaticResource hiddenLabel}}" Width="450" /> </igDP:Field.Settings> </igDP:Field> </igDP:FieldLayout> </igDP:XamDataCards.FieldLayouts> </igDP:XamDataCards>
Hello,
Lets first get on the same page about what we mean by 'Wrap'. In my oppinion WrapText means that the text if long is displayed on multiple lines and the width of the field remains a constant. Our editors by default display the text on multiple lines if the text is too long. The reason why it might not be dispalyed that way in DataCards is that there is not enoigh Heigh of the field containing the editor. To fix that you need to read that:
http://forums.infragistics.com/forums/t/47136.aspx
On the other hand, if you want the width of the field to be determined by the lenght of the text in it you'd need to do the following:
xdp.FieldLayouts[0].Fields[0].Settings.Width = Infragistics.Windows.DataPresenter.FieldLength.Auto;
What it would acheive is set the width of the first field in the first layout to be Auto (determined by the biggest contained text).
Ivan
Infragistics Software Engineer in Test
Anyone please?