Dockpanel vs Stackpanel
Can anyone explain why Dockpanel lets me align text to the right while Stackpanel does not?

Orientation="Horizontal". If you do that, then items will be stacked horizontally. That's what the stackpanel is for: stacking. If you need to align stuff on different side, you'll need dockpanel, as you already figured outHorizontalAlignment of the first TextBlock to Right, both would occupy the same space. DockPanel.Dock="Right" on both TextBlocks, the first one will dock to the wall and take as much space as it needs then the second one will dock next to that one and take as much space as it needsOrientation="Horizontal"HorizontalAlignmentDockPanel.Dock="Right"<DockPanel Grid.Column="0" Grid.Row="0">
<TextBlock Text="File size:"/>
<TextBlock Text="0.00 MB" DockPanel.Dock="Right"/>
</DockPanel>