开发者

WPF TabControl - visibility-based enabling of display-calculations

开发者 https://www.devze.com 2023-01-12 04:53 出处:网络
Suppose I have a tab-based interface like Internet Explorer. In each tabpage cpu-intensive stuff can happen (f.e. displaying a w开发者_JAVA技巧aveform and calculating and displaying a realtime FFT) th

Suppose I have a tab-based interface like Internet Explorer. In each tabpage cpu-intensive stuff can happen (f.e. displaying a w开发者_JAVA技巧aveform and calculating and displaying a realtime FFT) that is only relevant as realtime statistic - so only when it's actuallty visible to the user.

What's the best way to approach this ?


You can subscribe to the PropertyChanged event of the TabControl (with SelectedIndex property) to detect which tab is displayed.


I'm not sure there is a similar control in WPF but I think the thought is the same.

In Silverlight there is a Navigation Pane control which shows only the page which is selected from the tabcontrol. This way only relevant data is shown.

0

精彩评论

暂无评论...
验证码 换一张
取 消