Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
445
TextWrapping is not working when IsExpandable=True
posted

Hi,

Below is my xaml for a field.  The text wrapping works fine when the IsExpandable = False, it does not work when IsExpandable = True.

 

Any ideas as to what I may be missing?

 

<igDP:Field Name="Message" Width="100" IsExpandable="True" >

<igDP:Field.Settings>

<igDP:FieldSettings AllowEdit="False">

<igDP:FieldSettings.EditorStyle>                                      

<Style TargetType="{x:Type igEditors:XamTextEditor}">

<Setter Property="TextWrapping" Value="Wrap" />

</igDP:FieldSettings.EditorStyle>

</igDP:FieldSettings>

</igDP:Field.Settings>          

</igDP:Field>

Parents
No Data
Reply
  • 138253
    Verified Answer
    Offline posted

    Hello Troy,

    Thank you for your post. I have been looking into it and I can say that when you set the Field’s IsExpandable to true, there won’t be any CellValuePresenter and Editor for this Field. This is why your Style id not applied. If you want to have text wrapping when a Field is expandable you have to create a Style for the ExpandableFieldRecordPresenter and add an EventSetter for the Loaded event. Then in the handler you can get the TextBlock that is used and set its Width and TextWrapping properties. I created a sample project for you showing this approach. Please let me know if this helps you or you have further questions on this matter.

    Looking forward for your reply.

    ExpandableFieldTextWrap.zip
Children