简体   繁体   中英

WPF application in a one window

  1. I would like to make an application in a one window using XAML. It should be like a slideshow with next and back button. One idea is to make 4 panels and have just one enable at the time. Is there any other way to do this? Like dynamic loading of other XAML?

  2. is it the BackgroundWorker mandatory to use with WPF (hence is DirectX rendered there's almost no GUI lags) ?

  1. You can do it with Pages that you can show in a window. Just create a window for every page and change the root tag to Page.
  2. It should be used if you want to perform a long running, non-UI related task, to prevent locking the UI.

我认为可以使用VirtualizingStackPanel轻松实现。

1.You can use ItemTemplate and load any one you wish on your click event.

2.BackgroundWorker is always a better choice to use.

我发现了其他解决方案:Tab Control IMO更好-更灵活

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM