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.

stackpanel example screenshot

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.

dockpanel example screenshot


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -