What is the difference between a StackPanel and DockPanel in WPF? -
what can dockpanel stackpanel cannot? if has image of can achieved stackpanel, not dockpanel, great.
stack panel: stackpanel, name implies, arranges content either horizontally or vertically. vertical default, can changed using orientation property. content automatically stretched based on orientation (see screenshot below), , can controlled changing horizontalalignment or verticalalignment properties.

dock panel: dockpanel used anchor elements edges of container, , choice set overall structure of application ui. elements docked using dockpanel.dock attached property. order elements docked determines layout.

Comments
Post a Comment