Son of a Bit

01010011 01100101 01101100 01000001 01110010 01101111 01101101

0 notes

Align content inside a HubSection in the Windows Hub Control

I was fighting this for a while before I stumbled on this solution. If you are using the new Hub Control and have a big Hero image at the front, but also want to place some content (like the headline, etc) at the bottom of that hub section, you need to make sure that you set Stretch for each of the VerticalAlignment, VerticalContentAlignment, HorizontalAlignment, and HorizontalContentAlignment of the HubSection. Do that and you can then align your controls within the HubSection instead of placing at the top left corner. Original post is here, with my unending thanks: How to get text placed at bottom of hub page
<HubSection Width="500"             
            Header="Section" 
            VerticalAlignment="Stretch" 
            VerticalContentAlignment="Stretch">
                <DataTemplate>
                    <Grid>
                        <TextBlock Text="Bottom Text"
                        VerticalAlignment="Bottom"/>
                    </Grid>
                </DataTemplate>
            </HubSection>

Filed under Windows Store Apps Hub Alignment XAML