In this paper, we will synthesize a comprehensive example-simple RSS reader by synthesizing several aspects of interface layout, style, control template, data binding and network communication, which are discussed in the previous 17 articles.
Interface layout
Our final RSS reader interface is as follows:
Define a grid of three rows and two columns, placing the top information, the split line, and the following content area, respectively:
<Grid.RowDefinitions>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="20"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions><Grid.ColumnDefinitions>
<ColumnDefinition Width="240"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions& gt;
Design the top input area, merge the first line of grid, and place a StackPanel:
<stackpanel x:name= "Header" orientation= "Horizontal"
grid.row= "0" grid.column= "0" grid.columnspan= "2" >
<image source= "Rss.png" width= "height=" margin= "0 0" ></Image>
<border style= "{StaticResource Titleborder}" >
<textblock text= "Silverlight-based RSS reader" foreground= "#FFFFFF"
Verticalalignment= "Center" margin= "0 0 0" ></TextBlock>
</Border>
<watermarkedtextbox x:name= "feedaddress" width= "35" height= "
Fontsize= "margin=" "0 0" >
<WatermarkedTextBox.Watermark>
<textblock text= "Please enter a valid RSS address" verticalalignment= "Center"
Foreground= "#FBA430" fontsize= "></TextBlock>"
</WatermarkedTextBox.Watermark>
</WatermarkedTextBox>
<button x:name= "Displaybutton" style= "{StaticResource Button}"
Content= "Show" click= "Displaybutton_click" ></Button>
<button x:name= "Fullscreenbutton" style= "{StaticResource Button}"
content= "Full Screen" click= "Fullscreenbutton_click" ></Button>
</stackpanel&g T;