Class OutlineViewModel
Inheritance
System.Object
OutlineViewModel
Assembly: pdftron.PDF.Tools.dll
public class OutlineViewModel : ViewModelBase, IDisposable
Constructors
Declaration
public OutlineViewModel(PDFViewCtrl ctrl)
Parameters
Type |
Name |
Description |
PDFViewCtrl |
ctrl |
|
Fields
Declaration
public OutlineViewModel.DocumentModifiedEventHandler DocumentModified
Field Value
Properties
Declaration
public RelayCommand AddOutlineCommand { get; }
Property Value
Declaration
public bool CanReorder { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public int CheckedAmount { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
The root level nodes within the Outline's TreeView. These Root level nodes can have 0
or more child level nodes. Each child node is also a root node for their own child node collection.
This is used as the TreeView's ItemSource.
Declaration
public ObservableCollection<BookmarkNode> DataSource { get; }
Property Value
Declaration
public RelayCommand EnterEditingCommand { get; }
Property Value
Declaration
public RelayCommand ExitEditingCommand { get; }
Property Value
Declaration
public bool HasBookmarkNodes { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Controls the visibility of the main Edit Outline button
Declaration
public bool IsEditButtonVisible { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Enable or disable the ability to edit the outline
Declaration
public bool IsEditEnabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
The state of the ViewModel. Must be set to true to add, remove, rename, and
reorder BookmarkNodes.
Declaration
public bool IsEditing { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public BookmarkNode LastInvokedNode { get; set; }
Property Value
Methods
Adds a new BookmarkNode to the outline.
Declaration
public void AddOutlineCommandImpl(object sender)
Parameters
Type |
Name |
Description |
System.Object |
sender |
The sender is the Parent node that is calling this command. The newly created BookmarkNode
will be add to the Parent BookmarkNode's collection, otherwise it will be added to the
Root nodes list (DataSource).
|
Gets a level of Bookmarks from the doc.
Declaration
public IAsyncOperation<bool> AdjustIsOpen(BookmarkNode node)
Parameters
Type |
Name |
Description |
BookmarkNode |
node |
The target node to adjust IsOpen
|
Returns
Type |
Description |
Windows.Foundation.IAsyncOperation<System.Boolean> |
True if the target node's SourceBookmark was adjusted
|
CancelEditingText(String)
Declaration
public void CancelEditingText(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Create the list of bookmarks present in the current document by loading the
first depth of node
Declaration
public Task CreateTreeAsync()
Returns
Unsubscribes the DataSource's items and its children from events,
and removes items from their observable collections.
Declaration
Expand a specific parent node by loading it's children from it's source bookmark
Declaration
public Task ExpandTreeViewNodeAsync(BookmarkNode parentBookmarkNode)
Parameters
Type |
Name |
Description |
BookmarkNode |
parentBookmarkNode |
Parent node to be expanded
|
Returns
FinishEditingText()
Declaration
public void FinishEditingText()
Gets a level of Bookmarks from the doc.
Declaration
public IAsyncOperation<IList<Bookmark>> GetBookmarkListAsync(Bookmark root, PDFDoc doc)
Parameters
Type |
Name |
Description |
Bookmark |
root |
The root bookmark
|
PDFDoc |
doc |
The PDF document
|
Returns
Type |
Description |
Windows.Foundation.IAsyncOperation<IList<Bookmark>> |
A list of Bookmarks
|
Removes all root BookmarkNodes that are Checked.
Declaration
public void RemoveBookmarkNodes()
Declaration
public Task WaitForOutlineToLoadAsync()
Returns
Events
Declaration
public event OutlineViewModel.FocusOnSelectedItemEventHandler FocusOnSelectedItemRequested
Event Type
Implements
IDisposable