We have discovered an issue in the TreeView for instances where IsVirtualizing is set to true and LoadOnDemand is enabled where the tree view ignores the OptionType setting for newly created items.
When the page loads, we loop through a collection of items and add them to the tree like so:
The pertinent code for the Treeview_LoadOnDemand method is below. I simplified it some as our actual code checks the datacontext of the source item and enables LoadOnDemand for certain types.
The resulting tree view displays a checkbox for every item in the tree, even though the child items have an OptionType of None. If I set IsVirtualizing to false, the items are created correctly. I would like to use the virtualizing feature though as we can have over 1000 items in our top layer and some of our clients are running very old machines.