If I set a StackPanel or what ever bound area I have as 'Collapsed', does the data load?
Will it trigger its Loaded event?
相关问题
- VNC control for WPF application
- WPF Binding from System.Windows.SystemParameters.P
- XAML: Applying styles to nested controls
- How can I add a horizontal line (“goal line”) for
- How to properly change a resource dictionary
Yes:
But in the section of the visual tree under the
Visibility="Collapsed"
element:So the bottom line is, if you want to avoid loading data for invisible sections of your UI, don't load your data and set your DataContext until after the control is first measured. Also consider putting any complexity inside a template.