Hi,
i have this code:
xaml: <igDP:XamDataGrid Name="XamDataGrid1"/>
vb:
Public Class CViewmodel
Get
End Sub
For Each aField As Field In e.FieldLayout.Fields
Dim aLabel As New TextBlock
aLabel.Text = aField.Name &
"*"
aField.Label = aLabel
Next
It causes an exception. Why doesn't this work? How can in add a Control-Instance to the header?
Same problem is with the tabcontrol in dockingmanager. Guees same problem for all headeredcontentcontrols.
Thanks for your reply,
karle
Hello Karle,
I have been looking into your issue and am not quite sure what are you trying to achieve with this snippet. If you want to set your Field’s Label through code all you have to do is :
aField.Label = aField.Name + " *"
If you want to alter the visual tree of the Field header you can retemplate its LabelPresenter using the FieldSetting’s LabelPresenterStyle property. You can get the original template form the DefaultStyles folder provided with the product.
Hope this helps. Please let me know if you require any further assistance on the matter.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support