/// <summary> /// IsHardPaperProperty property changed handler. /// /// </summary> /// <param name="d">RadBookItem that changed its IsHardPaper.</param><param name="e">Event arguments.</param> private static void OnIsHardPaperPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RadBookItem radBookItem = d as RadBookItem; bool newValue = (bool)e.NewValue; bool oldValue = (bool)e.OldValue; if (radBookItem == null) { return; } radBookItem.OnIsHardPaperChanged(oldValue, newValue); }
private void RadBookItem_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (!this.CanBeTurned) { return; } this.mousePoint = e.GetPosition((IInputElement)this); if (!FoldHelper.MouseWithinFoldAreas(this.mousePoint, this) && this.FoldSize != new Size(0.0, 0.0)) { return; } this.draggedCorner = FoldHelper.GetQuadrant(this.mousePoint, this); this.targetCorner = RadBookItem.GetOppositeCorner(this.draggedCorner); this.UpdatePageFold(); if (this.doubleClickMode && this.PageFlipMode == PageFlipMode.DoubleClick) { if (this.mouseDoubleClick != null) { this.mouseDoubleClick((object)this, new MouseClickEventArgs(this.targetCorner)); } this.doubleClickMode = false; this.doubleClickTimer.Stop(); } else { this.singleClickMode = this.PageFlipMode == PageFlipMode.SingleClick; this.doubleClickMode = this.PageFlipMode == PageFlipMode.DoubleClick; this.dragStarted = true; if (this.PageFlipMode == PageFlipMode.SingleClick) { this.singleClickTimer.Start(); } else if (this.PageFlipMode == PageFlipMode.DoubleClick) { this.doubleClickTimer.Start(); } else { this.singleClickTimer.Stop(); this.doubleClickTimer.Stop(); } if (this.mouseDragStart == null) { return; } this.mouseDragStart((object)this, new DragStartedEventArgs(this.draggedCorner, this.mousePoint)); } }
/// <summary> /// Initializes a new instance of the <see cref="T:Telerik.Windows.Controls.PageFlipEventArgs"/> class. /// /// </summary> /// <param name="source">The source.</param><param name="page">The page.</param><param name="routedEvent">The routed event.</param> public PageFlipEventArgs(object source, RadBookItem page, RoutedEvent routedEvent) : base(routedEvent, source) { this.Page = page; }