Building a Windows 8 Metro App, Part 3: Listing 6

The Updated LayoutHeader Grid in MainPage.xaml

<Grid x:Name="LayoutHeader" Grid.ColumnSpan="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <StackPanel Grid.Column="1" Margin="0,8">
                <TextBlock FontSize="40">Daily Reader</TextBlock>
                <StackPanel Orientation="Horizontal">
                    <TextBlock FontSize="20">Feed URL:</TextBlock>
                    <TextBox x:Name="FeedUrl" MinWidth="450" Margin="4,0" FontSize="20"></TextBox>
                    <Button x:Name="FetchButton">Fetch</Button>
                    <Button x:Name="SetDefaultButton" Click="SetDefaultButton_Click">Set as default</Button>
                    <TextBlock FontSize="20"># Items</TextBlock>
                    <TextBox x:Name="NumFeeds" MinWidth="40" Margin="4,0" FontSize="20"></TextBox>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock x:Name="FeedTitle" VerticalAlignment="Center" Text="{Binding Path=Title}"
                       FontSize="32" Margin="56,0,0,0" />
                    <TextBlock x:Name="Cached" FontSize="20" FontStyle="Italic" 
                    Visibility="Collapsed">Cached</TextBlock>
                </StackPanel>
            </StackPanel>
  </Grid>

About the Author

Eric Vogel is a Senior Software Developer for Red Cedar Solutions Group in Okemos, Michigan. He is the president of the Greater Lansing User Group for .NET. Eric enjoys learning about software architecture and craftsmanship, and is always looking for ways to create more robust and testable applications. Contact him at [email protected].

comments powered by Disqus

Featured

Subscribe on YouTube