I have taken a grid with tileview on a windows page and am composing the template and the elements for the tile view from the code behind.
The code i am using is as follows -
addressValue.Column = tileView1.Columns("NewItemName")
addressValue.AnchorElement = splitLine
addressValue.AnchorIndent = 2
addressValue.AnchorOffset = New Point(SubWidth / 10, 0)
addressValue.AnchorAlignment = DevExpress.Utils.AnchorAlignment.Bottom
'addressValue.TextLocation = New Point(0, 100)
addressValue.MaxWidth = SubWidth - ((SubWidth / 9))
addressValue.TextAlignment = TileItemContentAlignment.TopCenter
addressValue.Appearance.Normal.FontSizeDelta = 3
addressValue.Appearance.Normal.FontStyleDelta = FontStyle.Regular
addressValue.Appearance.Normal.ForeColor = Color.FromA#333333 '' Color.Black
'addressValue.Appearance.Normal.Font = New Font("Humanst521 BT", 7.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (CByte(0)))
addressValue.Appearance.Normal.Font = New Font("Humanst521 BT", 12, FontStyle.Regular, GraphicsUnit.Pixel)
addressValue.Height = (Subhight * 30) / 100
'addressValue.Appearance.Norm
The problem is that the Value is not getting aligned even though i have used the instruction of TextAlignment. The alignment does not change for any of the alignments that i select - left, right or Center.
Please help asp.
Hello Vinod,
Would you please clarify if other customizations work as expected? Currently, I assume that the issue occurs because your instance of the TileViewItemElement class is not added to the TileView.TileTemplate collection. I have created a small sample project based on your code and it works well on my side. If my suggestion about the TileTemplate collection does not help, please modify my sample or create your own one to illustrate the issue. I hope to hear from you soon.
Dear Aleks,
Thanks for the prompt response.
I have recreated my problem in your sample and the same is attached herewith.
To give you more details, I have taken a template with 4 elements namely an Image, splitline horizontal, splitline vertical and text. And these have to in the order of image, splitlines and text as the last element. If i follow your code then i cannot get the anchoring of these elements in the order in which i need them.
Please help