Class PopupCommandMenu
Inheritance
Namespace: pdftron.PDF.Tools
Assembly: pdftron.PDF.Tools.dll
Syntax
public sealed class PopupCommandMenu : object
Constructors
PopupCommandMenu(PDFViewCtrl, Dictionary<String, String>, CommandMenuClickedHandler)
Declaration
public PopupCommandMenu(PDFViewCtrl ctrl, Dictionary<string, string> its, CommandMenuClickedHandler dlg)
Parameters
Type | Name | Description |
---|---|---|
pdftron.PDF.PDFViewCtrl | ctrl | |
Dictionary<System.String, System.String> | its | |
CommandMenuClickedHandler | dlg |
PopupCommandMenu(PDFViewCtrl, IList<String>, CommandMenuClickedHandler)
Creates a new command menu that will position itself relative to a point or element
Declaration
public PopupCommandMenu(PDFViewCtrl ctrl, IList<string> its, CommandMenuClickedHandler dlg)
Parameters
Type | Name | Description |
---|---|---|
pdftron.PDF.PDFViewCtrl | ctrl | The PDFViewCtrl in which to position itself |
IList<System.String> | its | A list of options |
CommandMenuClickedHandler | dlg | A handler for when an option is selected |
Properties
MenuItems
The list of buttons displayed on the Popup menu
Declaration
public List<Button> MenuItems { get; set; }
Property Value
Type | Description |
---|---|
List<Windows.UI.Xaml.Controls.Button> |
UseArrowHead
Enable or Disable the use of Arrow Head on the Popup Menu NOTE: Using Arrow Head will disable round corners
Declaration
public bool UseArrowHead { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UseIcons
Set On or Off the use of icons instead of text for the buttons created
Declaration
public bool UseIcons { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
AddMenuItem(Button, Boolean)
Add an extra button to the Popup Menu
Declaration
public void AddMenuItem(Button btn, bool setStyle)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Controls.Button | btn | The new button to be added |
System.Boolean | setStyle | Set default style to the newly added button |
Hide()
Hides the menu
Declaration
public void Hide()
Show()
Shows the menu
Declaration
public void Show()
TargetPoint(Point)
Provide a point in screen space that the menu should be attached to.
Declaration
public void TargetPoint(Point p)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Point | p | Note: Not a pdftron point |
TargetSquare(Double, Double, Double, Double)
Gives a target rectangle as 4 points in PDFViewCtrl space
Declaration
public void TargetSquare(double x1, double y1, double x2, double y2)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x1 | |
System.Double | y1 | |
System.Double | x2 | |
System.Double | y2 |
TargetUIRectangle(FrameworkElement)
Provide a rectangle of the Framework Element that the menu should be attached to. Note: It is up to the user to update the PopupCommandMenu if that item moves Note: Also, it is up to the user to provide a new reference if the view somehow changes (e.g. tablet is rotated)
Declaration
public void TargetUIRectangle(FrameworkElement element)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.FrameworkElement | element | The Framework element |
UseFadeAnimations(Boolean)
Enables or disables fade in and out animations
Declaration
public void UseFadeAnimations(bool yes)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | yes | true to enable, false to disable (default) |