3 using System
.Windows
.Controls
;
4 using System
.Windows
.Data
;
5 using System
.Windows
.Navigation
;
7 namespace IPCCSSampleCSharp
9 public partial class HomePage
: Page
, IProvideCustomContentState
13 InitializeComponent();
15 // Display initial read count
16 this.readCountLabel
.Content
= 1;
19 CustomContentState IProvideCustomContentState
.GetContentState()
21 // Store vertical position of scroll viewer with navigation history entry
22 // before being navigated to next page.
23 return new CustomPageContentState(this.documentScrollViewer
.VerticalOffset
, int.Parse(this.readCountLabel
.Content
.ToString()));