private void Window_Loaded(object sender, RoutedEventArgs e) { pdfRendererer1.Filename = "glm.pdf"; string message = ""; Stream LoadStream; if (!TEST_ANNOT) { LoadStream = new MemoryStream(PdfiumViewerWPFSimple.Properties.Resources.glm); } else { using (FileStream fs = new FileStream(TEST_ANNOT_INPUT, FileMode.Open)) { byte[] data = new byte[fs.Length]; fs.Read(data, 0, data.Length); LoadStream = new MemoryStream(data); } } pdfRendererer1.ViewArea.PdfRenderer.Load(PdfRenderer.OpenDocument2(LoadStream, ref message)); //FIXME: timer.Interval = TimeSpan.FromMilliseconds(100); timer.Tick += timer_Tick; timer.Start(); this.slider1.DragOver += delegate { this.isSliderEnter = true; }; this.slider1.ValueChanged += new RoutedPropertyChangedEventHandler <double>(Window1_ValueChanged); this.slider1.MouseEnter += delegate { this.slider1.Visibility = Visibility.Visible; this.slider1.Opacity = 1.0; this.isSliderEnter = true; }; this.slider1.MouseLeave += delegate { this.isSliderEnter = false; }; this.KeyDown += new KeyEventHandler(Window1_KeyDown); }