Questions tagged [visualtreehelper]
92 questions
1
vote
1 answer
WPF | VisualTreeHelper.GetChildrenCount(this) on collapsed parent
I have a "huge" Control where ~50% of it is collapsed. You can switch by a property to hide the visible part and show the collapsed one.
Now when the Control is loaded, I try to find all FooControls in the visible and collapsed part of the control.…

Dominic Jonas
- 4,717
- 1
- 34
- 77
1
vote
1 answer
Getting ListBox Items Silverlight
I have tried to get the listbox items using VisualTreeHelper class. When I do VisualTreeHelper.GetChildrenCount((DependencyProperty)listBox1) it returns count as 0. But the listbox has lot of listboxitems in it.Can someone let me know if I am doing…

Lalith
- 19,396
- 17
- 44
- 54
1
vote
0 answers
chart series not saved in the image
In my WPF project I use the Control.Datavisualization.Charting.Chart control to plot some line series.
I also would like to store the Chart into an image, so I do the following (after series creation):
this.chart.Series.Clear();
…

FrancescoDS
- 1,077
- 4
- 21
- 55
1
vote
1 answer
media element from visual tree does not display video just audio in 8.1 store app
I have a video to play in 8.1 windows store app and wanna to keep audio playing after navigating to other page .. i did it using visualTreeHelper so i declare a media element in app.xaml and add it to frame in app.xaml.cs , and get it in the…

Malek Farhi
- 11
- 2
1
vote
0 answers
Finding a control in WPF sometimes works and sometimes doesn't. Why?
I have a datagrid with a button in each column header. Here's the XAML: