-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMyDocumentLayoutVisitor.vb
More file actions
26 lines (20 loc) · 1017 Bytes
/
Copy pathMyDocumentLayoutVisitor.vb
File metadata and controls
26 lines (20 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Imports DevExpress.XtraRichEdit.API.Layout
Namespace LayoutApiSimpleExample
#Region "#MyDocumentLayoutVisitor"
Friend Class MyDocumentLayoutVisitor
Inherits DevExpress.XtraRichEdit.API.Layout.LayoutVisitor
Protected Overrides Sub VisitRow(ByVal row As DevExpress.XtraRichEdit.API.Layout.LayoutRow)
If row.GetParentByType(Of DevExpress.XtraRichEdit.API.Layout.LayoutPageArea)() IsNot Nothing Then
System.Diagnostics.Debug.WriteLine("This row is located at X: {0}, Y: {1}, related range starts at {2}", row.Bounds.X, row.Bounds.Y, row.Range.Start)
End If
' Call the base VisitRow method to walk down the tree to the child elements of the Row.
' If you don't need them, comment out the next line.
MyBase.VisitRow(row)
End Sub
Protected Overrides Sub VisitPage(ByVal page As DevExpress.XtraRichEdit.API.Layout.LayoutPage)
System.Diagnostics.Debug.WriteLine("Visiting page {0}", page.Index +1)
MyBase.VisitPage(page)
End Sub
End Class
#End Region ' #MyDocumentLayoutVisitor
End Namespace