I have some experience in making Winform applications, but not in WPF.
My questions is about panels in WPF.
In Winform, say, I have two panels: PanelA and PanelB. I can place PanelB on top of PanelA by setting PanelB to visible and PanelA to hidden. By doing so, all the controls on PanelA are disabled, which means the controls are not visible to users and cannot be selected by hitting TAB.
However, in WPF, I cannot find an equivalent control to achieve the same effect. I have tried Rectangle, but the controls on the underneath Rectangle can still be selected if the users hit TAB.
I want something that can not only visually block the controls(buttons, etc.), but also preventing the users from selecting them by hitting TAB.
I know there is a way to do it by setting the IsEnabled property to false in WPF in order to disable the controls. But is there an easier way? Like the Panel control in Winform?
StackPanel,WrapPanel, andGridserve that purpose. They all have anIsEnabledproperty which disables all children when false. We think about layout differently in XAML so you'll really need to read MSDN on each of those container controls. I've linked the MSDN pages for each. - 15ee8f99-57ff-4f92-890c-b56153IsEnabledto enable/disable, and use theVisibilityproperty to hide/show (along with either a valueconverter or a style trigger). - 15ee8f99-57ff-4f92-890c-b56153