Its pretty lame, but I tried adding two UserControl\'s to my Silverlight Page, and I get an exception telling me (with extensive digging) that the same control name has been used to the visual tree tw
I have a tree- or menu-like data structure which I wan开发者_如何学Ct to display in a Panel (specifically a self-made PolarPanel), but all items must be VisualChildren of the same panel.
I\'ve made a simple project to illustrate my problem. I have a user control (\'ButtonPod\') that houses a button and a rectangle:
[Silverlight] I have a large visual object tree I\'m removing from the visual tree (Grid.Children.Clear()), upon removal the DataContext of the root nulls out, but further down the tree a binding开发者
For example, I create a Canvas that contains a big amount of Shapes like this: var canvas = CreateCanvasThatContainsShapes();
I have a DataGrid with DataGridTemplateColumn. The DataGridTemplateColumn contains a button and TextBlock.
Based on some custom security settings, I alter window child controls to readonly and disabled. To accomplish this, I loop through child controls when the window loads.
I have a question of how I can use the visual tree helper to get an object 开发者_如何转开发that I need.
I would like to remove a FrameworkElement from the visual tree. Since the FrameworkElement has a Parent property, it would be obvious to solve this problem by removing it from there:
I\'m displaying a few 3D-models as Model3DGroups. They are surrounded by Viewport3D which catches MouseDown-events.