I need to disable (or make it invisble) checkboxes in some nodes in my xamDataTree, preferrably using binding to the underlying data. I can disable all checkboxes using CheckBoxStype property of the xamDataTree, but can not find on how to do it for each individual node.
Thanks in advance,
Yuriy
Hello yuriypavlish,
I am checking if this is still an issue for you.
If you require any further assistance please do not hesitate to ask.
Does the property that you are binding to for your checkboxes raise a NotifyPropertyChanged when the value is toggled via code? If not then any binding you set up wouldn't be able to react until the data context on the node control is reset.
I have been looking into your last post and the ‘XamDataTreeNodeControl’ is an object that acts as the visual representation of a ‘XamDataTreeNode’ object.
Would you please tell me whether the checkboxes are set as you start the application or you change their state in any other way while the application is already running?
I am looking forward to hearing from you.
I am not sure what do you mean by XamDataTreeNodeControl ( I am new to Silverlight).
I tied to add checkbox to the ItemTemplate and hide checkboxes provided by XamDataTree. Now I can control each individual checkbox, I had to implement code to check/uncheck children of the parent node.
I can use this solution, however I am seeing strange behavior - checkboxes are not refreshed in the screen unless I scroll updated nodes from the viewable area and then scroll them back.
Thanks
To do this you would have to retemplate the XamDataTreeNodeControl.
The relevant area of the new style would look something like
<CheckBox x:Name="Checkbox"
IsEnabled="{Binding Node.Data.EnableCheckBoxField, RelativeSource={RelativeSource TemplatedParent}}"