I have field in a XamDataGrid where I want to have an infinity subscript character in the header for the column. I have achieved this using the following XAML.
<igDP:Field Name="MyDataValue" > <igDP:Field.Label> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <TextBlock Grid.Column="0" Text="X" /> <TextBlock Grid.Column="1" VerticalAlignment="Bottom" Text="∞" FontSize="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=FontSize, Converter={StaticResource FontSizeMultiplierConverter}, ConverterParameter=0.8}"/> </Grid> </igDP:Field.Label> </igDP:Field>
However when I left-click and drag the column header, the label comes off the column such that the header text is now blank. The image below shows the header before and during the drag. Once released the column header remains blank.
Is there a way to prevent this behavior?
Let me know if you have any further questions on this matter.
Hi WpfDeveloper,
Our developers have investigated this issue and they have determined that this is not a supported scenario. The Label property should not be set to an element as this can only be used in one label instance. Rather than setting the Label such as you are, you can set the Label directly to your "X∞" string. If you require the ability to directly control how the text inside the label is displayed then you should provide a style for the LabelPresenter.
Thank you for bringing this to our attention. I was able to reproduce this pretty easily by just providing the Field.Label with some kind of content. Since I was able to reproduce this, I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 188912. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
In order for you to track the progress of this development issue, I have created a private support case which is linked to the development issue. The case number is CAS-151313-W4X1X2 and you can view it here: https://ko.infragistics.com/my-account/support-activity
As for a workaround, you could create a style targeting LabelPresenter and retemplate it to contain the text you desire. Once the style is created you can set the Field.Settings.LabelPresenterStyle property equal to this new style.