Hello,
I recently discovered an issue with the XamDateTimeEditor where it clips the end of the text with certain fonts. I attached an example of the issue (is it not possible to embed attached pictures anymore?). My XAML is as follows:
<igEditors:XamDateTimeEditor Grid.Column="1" x:Name="time2" Mask="hh:mm:ss" Value="{Binding Time2}" Theme="Aero" VerticalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" FontSize="11" FontWeight="Bold" FontFamily="Lucida Console" Background="{StaticResource InputFieldBackgroundBrush}" BorderBrush="{StaticResource InputFieldBorderBrush}" Foreground="{StaticResource FalconLabelBrush}" SpinButtonDisplayMode="OnlyInEditMode" SpinWrap="True" AllowDropDown="False" InvalidValueBehavior="RetainValue"/>
As you can see, I'm not doing anything particularly special, just a typical time editor control. When the font is set to Meiryo for example, the text is not clipped, but with Lucida Console set, the right part of the last character is sometimes clipped off. Is there someway to fix this?
Great, thank you Stefan.
I have logged this with development under ID: 118374 and I have also created a support ticket on your behalf: CAS-97386-TR267H and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://es.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://es.infragistics.com/Membership/MySupport.aspx
Hello Stefan,
UseLayoutRounding="True" was already set on the DataGrid that contained the XamDateTimeEditor control, but I tried setting it on the control itself as well, however, neither setting had any effect. In case it will help with your testing, here's the code for the column the editor is in:
<DataGridTemplateColumn Width="97" x:Name="Column11" Header="Time1"> <DataGridTemplateColumn.HeaderStyle> <Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource columnHeaderCommon}"> <Setter Property="Margin" Value="-1,0,0,0"/> <Setter Property="BorderThickness" Value="1,0,1,1"/> </Style> </DataGridTemplateColumn.HeaderStyle> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="17"/> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <CheckBox Grid.Column="0" VerticalAlignment="Center" IsChecked="{Binding Time1Flag}"/> <igEditors:XamDateTimeEditor Grid.Column="1" x:Name="time1" Mask="hh:mm:ss" Value="{Binding Time1}" Margin="0" Padding="0" VerticalAlignment="Stretch" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" FontSize="12" FontWeight="Bold" FontFamily="Lucida Console" Theme="Aero" Background="{StaticResource InputFieldBackgroundBrush}" BorderBrush="{StaticResource InputFieldBorderBrush}" Foreground="{StaticResource FalconLabelBrush}" SpinButtonDisplayMode="OnlyInEditMode" SpinWrap="True" AllowDropDown="False" InvalidValueBehavior="RetainValue" UseLayoutRounding="True" /> </Grid> <DataTemplate.Triggers> <Trigger SourceName="time1" Property="IsInEditMode" Value="False"> <Setter TargetName="time1" Property="Background" Value="Transparent"/> <Setter TargetName="time1" Property="BorderBrush" Value="Transparent"/> <Setter TargetName="time1" Property="Foreground" Value="Black"/> </Trigger> <DataTrigger Binding="{Binding IsNullItem}" Value="True"> <Setter TargetName="time1" Property="IsEnabled" Value="False"/> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> </DataGridTemplateColumn.CellTemplate></DataGridTemplateColumn>
Also, the clipping only occurs when the control is in edit mode. When the XamDateTimeEditor is not in edit mode it displays the text correctly without clipping the end.
Thank you for your post. I have been looking into it and I can suggest you set the XamDateTimeEditor’s UseLayoutRounding Property to True. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.