added samples
[windows-sources.git] / sdk / samples / WPFSamples / IPCCSSample / csharp / homepage.xaml.cs
blob4b250dedf9867bddff1fb4ea9f3aba2c0a4ee2da
1 using System;
2 using System.Windows;
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
11 public HomePage()
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()));