Dependency property identifier field: HorizontalAlignmentProperty
When Height and Width properties are explicitly set on an object, these measurements take higher precedent during layout and will cancel the typical effects of setting HorizontalAlignment to Stretch.
Canvas does not use HorizontalAlignment when composing layout, because Canvas is based on absolute positioning. In general, the value of HorizontalAlignment is potentially treated differently by any given object that is capable of having one or more FrameworkElement objects as child content.