Questions tagged [logical-tree]

20 questions
0
votes
1 answer

Building a logical tree for a custom control

I'm working on a control that has an ObservableCollection as one of its DependencyProperties. This property is set as the DefaultProperty for my control, so I can implicitly add items to the collection in XAML by constructing lines similar to the…
Nicholas Miller
  • 4,205
  • 2
  • 39
  • 62
0
votes
0 answers

Visual and Logical tree traversal does not retrieve several levels

I'm exploring logical and visual trees from the same application without success going deeper through the levels. My code uses a generic explorer: private static void ProcessGenericTree(object current, List leaves, Type treeType) …
Francesco De Lisi
  • 1,493
  • 8
  • 20
0
votes
1 answer

Trying to create a recursive method to list Logical dependencies in hierarchical order

I used a VisualTree helper to get all the Visuals in my window but sometimes some certain controls are not listed in the returning list. That's because they are still not rendered, as far as I know, VisualTree enumeration will help only if the…
David von Tamar
  • 797
  • 3
  • 12
  • 29
0
votes
1 answer

How to attach MenuItem to parent MenuItem in logical and visual trees?

I have created several MenuItems (not in XAML) so i added them the parent item : ( Parent_Menu as MenuItem ).Items.Add( Menu_Item ); Then i applied my styles by VisualTree list (in a loop) . But the styles won't apply on the new MenuItems . Here is…
David von Tamar
  • 797
  • 3
  • 12
  • 29
0
votes
1 answer

WPF optimization: logical trees in xaml, how are they being built?

I've been profiling my application and finding that a lot of the delays are due to the WPF initializations. I've found an article on WPF optimization saying that building a logical tree top-down will have better performance than if it were built…
Dan Vogel
  • 3,858
  • 7
  • 41
  • 57
1
2