BinaryRibbonLivePreview
The events a ribbon raises while offering a live preview, and the helpers for handling them.
public static class BinaryRibbonLivePreview
Remarks
Live preview is the ribbon's most recognisable behaviour: the pointer rests on a gallery item and the document shows what choosing it would do, moving away puts the document back, and clicking keeps the change. **The control cannot do any of that itself** - only the application knows what its document is and how to change it reversibly. So the ribbon says what the user is pointing at and when to stop, and the application does the rest. The three events bubble, so one handler on the ribbon, a tab or the window answers for every gallery beneath it. The order is always the same and is worth relying on: a PreviewRequestedEvent is followed by exactly one of PreviewCommittedEvent or PreviewCancelledEvent. Moving from one item straight to another raises a new request without a cancel in between, because the application is being told what to show, not asked to undo and redo.
Members at a glance
AddPreviewCancelledHandler | Adds a handler for PreviewCancelledEvent. |
AddPreviewCommittedHandler | Adds a handler for PreviewCommittedEvent. |
AddPreviewRequestedHandler | Adds a handler for PreviewRequestedEvent. |
RemovePreviewCancelledHandler | Removes a handler for PreviewCancelledEvent. |
RemovePreviewCommittedHandler | Removes a handler for PreviewCommittedEvent. |
RemovePreviewRequestedHandler | Removes a handler for PreviewRequestedEvent. |
PreviewCancelledEvent | Occurs when the user has stopped pointing at anything, and the application should put the document back as it was. |
PreviewCommittedEvent | Occurs when the user has chosen what they were pointing at, and the change should stay. |
PreviewRequestedEvent | Occurs when the user is pointing at something, and the application should show what choosing it would do. |
Methods
AddPreviewCancelledHandler
Adds a handler for PreviewCancelledEvent.
- element
- The element to handle it on.
- handler
- The handler.
AddPreviewCommittedHandler
Adds a handler for PreviewCommittedEvent.
- element
- The element to handle it on.
- handler
- The handler.
AddPreviewRequestedHandler
Adds a handler for PreviewRequestedEvent.
- element
- The element to handle it on.
- handler
- The handler.
RemovePreviewCancelledHandler
Removes a handler for PreviewCancelledEvent.
- element
- The element the handler was added to.
- handler
- The handler.
RemovePreviewCommittedHandler
Removes a handler for PreviewCommittedEvent.
- element
- The element the handler was added to.
- handler
- The handler.
RemovePreviewRequestedHandler
Removes a handler for PreviewRequestedEvent.
- element
- The element the handler was added to.
- handler
- The handler.
Fields
PreviewCancelledEvent
Occurs when the user has stopped pointing at anything, and the application should put the document back as it was.
PreviewCommittedEvent
Occurs when the user has chosen what they were pointing at, and the change should stay.
PreviewRequestedEvent
Occurs when the user is pointing at something, and the application should show what choosing it would do.