Class AnnotEdit
Note: Currently, PointerEvents when the textbox for editing FreeText annotations is open do not fire
Therefore, we will allow regular scroll and zoom, but we won't allow resize while in text edit mode.
Inheritance
System.Object
Windows.UI.Xaml.DependencyObject
Windows.UI.Xaml.UIElement
Windows.UI.Xaml.FrameworkElement
Windows.UI.Xaml.Controls.Panel
Windows.UI.Xaml.Controls.Canvas
AnnotEdit
Implements
Windows.UI.Composition.IAnimationObject
Windows.UI.Composition.IVisualElement
Assembly: pdftron.PDF.Tools.dll
public class AnnotEdit : Tool, IDependencyObject, IDependencyObject2, IUIElement, IUIElement2, IUIElement3, IUIElement4, IUIElement5, IUIElement7, IUIElement8, IUIElement9, IUIElement10, IUIElementOverrides, IUIElementOverrides7, IUIElementOverrides8, IUIElementOverrides9, IAnimationObject, IVisualElement, IFrameworkElement, IFrameworkElement2, IFrameworkElement3, IFrameworkElement4, IFrameworkElement6, IFrameworkElement7, IFrameworkElementProtected7, IFrameworkElementOverrides, IFrameworkElementOverrides2, IPanel, IPanel2, ICanvas
Constructors
Declaration
public AnnotEdit(PDFViewCtrl ctrl, ToolManager tMan)
Parameters
Type |
Name |
Description |
PDFViewCtrl |
ctrl |
|
ToolManager |
tMan |
|
Fields
Declaration
protected static int CONTROL_POINT_FOR_MOVING
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected const int e_fill = null
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected const int e_highlight = null
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected const int e_ll = null
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected const int e_lm = null
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected const int e_lr = null
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected const int e_ml = null
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected const int e_mr = null
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected const int e_stroke = null
Field Value
Type |
Description |
System.Int32 |
|
e_text_fill
Declaration
protected const int e_text_fill = null
Field Value
Type |
Description |
System.Int32 |
|
e_text_markup
Declaration
protected const int e_text_markup = null
Field Value
Type |
Description |
System.Int32 |
|
e_text_stroke
Declaration
protected const int e_text_stroke = null
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected const int e_ul = null
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected const int e_um = null
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected const int e_ur = null
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected Rectangle mAnnotBBoxRectangle
Field Value
Type |
Description |
Windows.UI.Xaml.Shapes.Rectangle |
|
Declaration
protected bool mAnnotIsMovable
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected bool mAnnotIsScalable
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected bool mAnnotIsSignature
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected bool mAnnotIsStamper
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected bool mAnnotIsSticky
Field Value
Type |
Description |
System.Boolean |
|
mAnnotIsTextMarkup
Declaration
protected bool mAnnotIsTextMarkup
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected double mAspectRatio
Field Value
Type |
Description |
System.Double |
|
Declaration
Field Value
Type |
Description |
System.Double |
|
Declaration
protected Path[] mControlPointShapes
Field Value
Type |
Description |
Windows.UI.Xaml.Shapes.Path[] |
|
Declaration
protected SolidColorBrush mCtrlPointBorderBrush
Field Value
Type |
Description |
Windows.UI.Xaml.Media.SolidColorBrush |
|
Declaration
protected double mCtrlPointBorderThickness
Field Value
Type |
Description |
System.Double |
|
Declaration
protected SolidColorBrush mCtrlPointFillBrush
Field Value
Type |
Description |
Windows.UI.Xaml.Media.SolidColorBrush |
|
Declaration
protected Point[] mCtrlPointLocations
Field Value
Type |
Description |
Windows.Foundation.Point[] |
|
Declaration
protected double mCtrlPointRadius
Field Value
Type |
Description |
System.Double |
|
Declaration
protected TranslateTransform[] mCtrlPointTransforms
Field Value
Type |
Description |
Windows.UI.Xaml.Media.TranslateTransform[] |
|
mEditTextBox
Declaration
protected RichEditBox mEditTextBox
Field Value
Type |
Description |
Windows.UI.Xaml.Controls.RichEditBox |
|
Declaration
protected int mEffectiveBrush
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected int mEffectiveCtrlPoint
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected ContextMenuControl mExtraContextMenu
Field Value
Declaration
protected double mFontSize
Field Value
Type |
Description |
System.Double |
|
Declaration
protected Rect mHelperModePositionRect
Field Value
Type |
Description |
pdftron.PDF.Rect |
|
Declaration
protected double mHorizontalMiddle
Field Value
Type |
Description |
System.Double |
|
mIsEditingText
Declaration
protected bool mIsEditingText
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected bool mIsManipulated
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected bool mKeyboardOpen
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected double mKeyboardTranslateOffset
Field Value
Type |
Description |
System.Double |
|
Declaration
Field Value
Type |
Description |
System.Double |
|
mMaintainAspectRatio
Declaration
protected bool mMaintainAspectRatio
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected IMarkup mMarkup
Field Value
Declaration
protected Dictionary<string, string> mMenuTitles
Field Value
Type |
Description |
Dictionary<System.String, System.String> |
|
Declaration
protected double mMinAnnotationSize
Field Value
Type |
Description |
System.Double |
|
Declaration
protected StackPanel mNoteDisplay
Field Value
Type |
Description |
Windows.UI.Xaml.Controls.StackPanel |
|
mNoteTextBox
Declaration
protected TextBox mNoteTextBox
Field Value
Type |
Description |
Windows.UI.Xaml.Controls.TextBox |
|
Declaration
protected int mNumberCtrlPts
Field Value
Type |
Description |
System.Int32 |
|
Declaration
protected double mOldBottom
Field Value
Type |
Description |
System.Double |
|
Declaration
protected double mOldLeft
Field Value
Type |
Description |
System.Double |
|
Declaration
protected double mOldRight
Field Value
Type |
Description |
System.Double |
|
Declaration
Field Value
Type |
Description |
System.Double |
|
Declaration
protected const int MOVE_WIDGET_CODE = null
Field Value
Type |
Description |
System.Int32 |
|
mPageCropOnClient
Declaration
protected Rect mPageCropOnClient
Field Value
Declaration
Field Value
Type |
Description |
System.Int32 |
|
Declaration
Field Value
Declaration
Field Value
Declaration
Field Value
Type |
Description |
System.Double |
|
mSaveTextOnExit
Declaration
protected bool mSaveTextOnExit
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected Color mSelectedColor
Field Value
Type |
Description |
Windows.UI.Color |
|
Declaration
protected SolidColorBrush mSelectionBackgroundColor
Field Value
Type |
Description |
Windows.UI.Xaml.Media.SolidColorBrush |
|
Declaration
protected bool mStartMoving
Field Value
Type |
Description |
System.Boolean |
|
mTextMarkup
Declaration
protected ITextMarkup mTextMarkup
Field Value
Type |
Description |
ITextMarkup |
|
Declaration
protected Popup mTextPopup
Field Value
Type |
Description |
Windows.UI.Xaml.Controls.Primitives.Popup |
|
Declaration
Field Value
Type |
Description |
System.Double |
|
Declaration
protected AnnotType mType
Field Value
Type |
Description |
AnnotType |
|
Declaration
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected double mVerticalMiddle
Field Value
Type |
Description |
System.Double |
|
Declaration
protected Canvas mViewerCanvas
Field Value
Type |
Description |
Windows.UI.Xaml.Controls.Canvas |
|
Declaration
protected const int START_MOVING_THRESHOLD = null
Field Value
Type |
Description |
System.Int32 |
|
Methods
Declaration
protected void CheckBoundsOnPointerMoved()
Delegate for the ColorPicker. Receives the color and saves the choice in the roaming settings
Declaration
protected void ColorPickerHandler(bool canceled, bool empty, Color color)
Parameters
Type |
Name |
Description |
System.Boolean |
canceled |
If the user clicked on cancel
|
System.Boolean |
empty |
If the selected Empty Color
|
Windows.UI.Color |
color |
The selected Color
|
Declaration
protected void ColorPickerKeyDown(object sender, KeyRoutedEventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
Windows.UI.Xaml.Input.KeyRoutedEventArgs |
e |
|
Updates the locations of control points and transforms
Declaration
protected virtual void CreateSelectionAppearance()
Translates the entire PDFViewCtrl if necessary in order to keep the text area above virtual keyboard
Declaration
protected void CustomKeyboardHandler(object sender, InputPaneVisibilityEventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
Windows.UI.ViewManagement.InputPaneVisibilityEventArgs |
e |
|
Declaration
protected void DelayedUnsubscribe()
Delete annotation on delete key pressed
Declaration
protected virtual void DeleteAnnotationOnKeyDown()
FlattenAnnotation(Page)
Declaration
protected virtual void FlattenAnnotation(Page page)
Parameters
Type |
Name |
Description |
pdftron.PDF.Page |
page |
|
Declaration
protected virtual void GetControlPoint(Point p)
Parameters
Type |
Name |
Description |
Windows.Foundation.Point |
p |
|
Gets the selected color of the current annotation
Declaration
protected void GetCurrentColor()
Declaration
protected Rect GetElementRect(FrameworkElement element)
Parameters
Type |
Name |
Description |
Windows.UI.Xaml.FrameworkElement |
element |
|
Returns
Type |
Description |
Windows.Foundation.Rect |
|
Declaration
protected void HandleAnnotCopy()
Declaration
protected Task HandleAnnotPasteAsync()
Returns
Declaration
protected void HandleCopy()
Declaration
protected void HandleCutAnnot()
Declaration
protected Task HandleDuplicateAnnotAsync()
Returns
HandleEditText()
Declaration
protected void HandleEditText()
HandleEditTextPhone()
Declaration
protected void HandleEditTextPhone()
HandleEditTextWindows()
Declaration
protected void HandleEditTextWindows()
Declaration
protected void HandleFlatten()
Declaration
protected void HandleFontSize()
Declaration
protected void HandleNote()
Declaration
protected void HandleOpacity()
Declaration
protected void HandleThickness()
Declaration
protected void HandleType()
Declaration
protected virtual void InitializeCanvasAndGeometry()
Translates the PDFViewCtrl back to offset 0
Declaration
protected void InputPaneHiding(InputPane sender, InputPaneVisibilityEventArgs e)
Parameters
Type |
Name |
Description |
Windows.UI.ViewManagement.InputPane |
sender |
|
Windows.UI.ViewManagement.InputPaneVisibilityEventArgs |
e |
|
Translates the typing area if necessary in order to keep the text area above virtual keyboard
Declaration
protected void NoteCustomKeyboardHandler(object sender, InputPaneVisibilityEventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
Windows.UI.ViewManagement.InputPaneVisibilityEventArgs |
e |
|
Translates the PDFViewCtrl back to offset 0
Declaration
protected void NoteInputPaneHiding(InputPane sender, InputPaneVisibilityEventArgs e)
Parameters
Type |
Name |
Description |
Windows.UI.ViewManagement.InputPane |
sender |
|
Windows.UI.ViewManagement.InputPaneVisibilityEventArgs |
e |
|
Declaration
protected void NoteKeyDown(object sender, KeyRoutedEventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
Windows.UI.Xaml.Input.KeyRoutedEventArgs |
e |
|
Declaration
protected void OnFontSizeSelected(string title)
Parameters
Type |
Name |
Description |
System.String |
title |
|
Declaration
protected virtual void OnOpacitySelected(string title)
Parameters
Type |
Name |
Description |
System.String |
title |
|
Declaration
protected void OnThicknessSelected(string title)
Parameters
Type |
Name |
Description |
System.String |
title |
|
Declaration
protected void OnTypeSelected(string title)
Parameters
Type |
Name |
Description |
System.String |
title |
|
Adds in the menu options according to the type of annotation
Declaration
protected virtual void PopulateMenu()
Declaration
protected void PositionTextEditingPopup()
Declaration
protected void RaisePropertyChangedInHelperMode()
SaveFreeText(String)
Declaration
protected void SaveFreeText(string text = null)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Sets the selected color of the current annotation
Declaration
protected virtual void SetCurrentAnnotColor()
SetFontSize(Annots.FreeText, Double)
This function sets the font size of the free text annotation
Declaration
protected void SetFontSize(Annots.FreeText ft, double fontSize)
Parameters
Type |
Name |
Description |
pdftron.PDF.Annots.FreeText |
ft |
The Free Text Annotation
|
System.Double |
fontSize |
The size of the font
|
Declaration
protected void SetOpacity(double opacity)
Parameters
Type |
Name |
Description |
System.Double |
opacity |
|
Declaration
protected virtual void SetPosition()
Declaration
protected void SetSubType(string subType)
Parameters
Type |
Name |
Description |
System.String |
subType |
|
Declaration
protected void SetThickness(double thickness)
Parameters
Type |
Name |
Description |
System.Double |
thickness |
|
Prepares and shows the color picker
Declaration
protected void ShowColorPicker()
Declaration
protected void UpdateColorPickerSettings(bool empty, Color color)
Parameters
Type |
Name |
Description |
System.Boolean |
empty |
|
Windows.UI.Color |
color |
|
Declaration
protected virtual void UpdateOpacitySettingsAndSetOpacity(double opacity)
Parameters
Type |
Name |
Description |
System.Double |
opacity |
|
Implements
Windows.UI.Composition.IAnimationObject
Windows.UI.Composition.IVisualElement
Extension Methods