Hi!
Recently I had a trouble as the following.
I did want a RowNumColumn with center horizontal alignment. so made it based on the post. (http://demos.telerik.com/silverlight/#GridView/RowNumber)
The Following line effect that if I scroll horizontal thumb slowly, left horizontal alignment column of GridView would be changed center alignment.
public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
{
TextBlock textBlock = cell.Content as TextBlock;
{
TextBlock textBlock = cell.Content as TextBlock;
if (textBlock == null)
{
textBlock = new TextBlock();
//The Following line effect that
//if you scroll horizontal thumb slowly, left horizontal alignment column of GridView would be converted center alignment.
//. ex (RowNum, Center, Center, Center, Left ... )
textBlock.HorizontalAlignment = HorizontalAlignment.Center;
}
{
textBlock = new TextBlock();
//The Following line effect that
//if you scroll horizontal thumb slowly, left horizontal alignment column of GridView would be converted center alignment.
//. ex (RowNum, Center, Center, Center, Left ... )
textBlock.HorizontalAlignment = HorizontalAlignment.Center;
}
textBlock.Text = String.Format("{0}", DataControl.Items.IndexOf(dataItem) + 1);
return textBlock;
}
}
Could I fix it or any walkarounds?