Access the set of allowed actions on a canvas. It is highly recommended to never change these settings on a canvas which you (the developer) did not create.
Gets or sets whether this control captures two-finger trackpad scroll and mouse-wheel events via its ScrollGesture. Set to false for FlexControls hosted in a Scrollable so the parent receives the scroll natively (native direction, momentum, rubber-band).
Gets the canvas which is currently drawing itself. Due to the non-concurrent nature of UI framework updates it's a fair bet that only one control at any given time is being drawn. However, if you need this property to make code work the way it was intended, it's an indication something has been poorly designed.
Gets the current window selection. This field will only be non-null during a window selection process. If you wish to respond to a completes window selection, handle the WindowSelection event.
Gets the current high-level cursor mode. Setting this property updates the displayed cursor as a side effect, ensuring the on-screen cursor always matches the logical state.
Gets whether this control should display scrollbars when needed. Scrollbars will only be displayed when the content exceeds the inner bounds. If AllowPan is set to False, then scrollbars will never be shown.
Gets the rail along which floating buttons are positioned. By default, the rail is equal to the inner bounds offset by the button size. Override this property to define a custom rail, for example if some regions near the control boundary need to remain free of buttons.
Gets or sets whether the canvas needs to trigger a redraw on every mouse-move event. Note that this field is set to false on every redraw, so it must be assigned anew every time.
Gets or sets whether draggable geometry can currently be dragged by directly clicking on it in the viewports. The state is mirrored into the loaded document, and restored from it whenever a different document is loaded.
VisibleFrame
publicRectangleFVisibleFrame{get;}
Gets the rectangle in content coordinates which represents the visible portion. This basically means the InnerBounds mapped into content coordinates.
Determine the implied wrapping bounds given the control and the screen containing the location. The wrapping bounds are either the bounds of the screen containing the location, or the intersection of the screen containing the location and the bounds of the control if this intersection is not empty.
Override this method to add a set of floating buttons to your control. It will automatically be called at the end of the constructor. You can always choose to add buttons later, but why not Zoidberg?
After the generic FlexControl dispatch returns Ignored, route the rotation gesture through a document hit-test so attributes on canvas objects can participate via their Responses. The hit-test runs once per gesture session and the result is cached, so the gesture stays on the original object even if its rotation moves it away from the cursor.
Draw this canvas to a bitmap. Content is drawn at its own coordinates from the top left corner, and only objects near the visible frame of this canvas take part.
Region to draw, in content coordinates. The region is scaled to fit the bitmap without distorting it. An empty region draws content at its own coordinates from the top left corner, framed by whatever this canvas can see.
If a window selection is currently in progress, draw the fill of that window selection fence. By calling this method you override the default window selection drawing pipeline, which allows you to have finer control over the layering of the window rectangle background and foreground.
If a window selection is currently in progress, draw the fill of that window selection fence. By calling this method you override the default window selection drawing pipeline, which allows you to have finer control over the layering of the window rectangle background and foreground.
If a window selection is currently in progress, draw the fill of that window selection fence. By calling this method you override the default window selection drawing pipeline, which allows you to have finer control over the layering of the window rectangle background and foreground.
If a window selection is currently in progress, draw the fill of that window selection fence. By calling this method you override the default window selection drawing pipeline, which allows you to have finer control over the layering of the window rectangle background and foreground.
Default mousedown handler for IControl. The default handling includes event delegation to the entire IInteraction stack, as well as the creation of Pan and Zoom interactions if needed.
Default mousemove handler for IControl. The default handling includes event delegation to the entire IInteraction stack, as well as the updating of any active window selection and hover delay tracking.
Default mouseup handler for IControl. The default handling includes event delegation to the entire IInteraction stack, as well as the terminating of any window selections and the popping of context menus. Furthermore, this method decides whether to provide a Click event for interaction objects.
Runs the drawing pipeline. Do not override this method unless you know *exactly* what you are doing. Handle the Draw(object, ControlDrawEventArgs) event instead.
SHIFT + pinch relays the pinch into the nested navigation target under the cursor, driving its zoom. Any other modifier falls through to the base implementation, which zooms the canvas projection.
Override this method to populate the context menu, or handle the PopulateContextMenu event. This method will automatically show the menu if it contains any items.
SHIFT + two-finger scroll relays the scroll into the nested navigation target under the cursor, driving its pan. Any other modifier falls through to the base implementation, which pans the canvas projection.
Add a responsive object to this control's awareness. Responsive objects which have been properly registered will automatically have their response methods invoked in case of mouse/keyboard events on the control. The object will not be drawn though, that is the responsibility of the owner.
Show a single-line text editor anchored to a rectangle in canvas content (world) coordinates. The editor tracks the canvas projection so it remains anchored to the same content rectangle when the user pans or zooms while editing, with its font scaled to match the current zoom.
The apply callback is invoked on every change to the text and is responsible for applying the change to the underlying model. If IResult.Success is true the editor displays a neutral state. If IResult.Success is false the editor tints its background and exposes IResult.Error as a tooltip, but no other action is taken — the most recently applied valid state is retained.
The editor closes automatically when it loses focus, and when the user presses Enter or Tab. In all these cases the last successfully applied value is kept. When the user presses Escape the cancel callback is invoked first (so the caller can restore the original state) and the editor then closes. The cancel callback is only invoked on Escape.
Only one inline editor can be active at a time; calling this method while another editor is open closes the existing one (without invoking its cancel) before opening the new one.
Update the mapping matrices. You *must* call this method whenever you change something that might affect the positioning of the content. For example origin, zoom, bounds...