Class PopupViewer
The PopupViewer control is used to display details and media, edit attributes, geometry and related records,
manage attachments of an
Namespace: Esri.ArcGISRuntime.Toolkit.UI.Controls
Assembly: Esri.ArcGISRuntime.Toolkit.WinUI.dll
Syntax
public class PopupViewer : Control
Remarks
The PopupViewer consists of a number of sub-controls all in the Esri.ArcGISRuntime.Toolkit.Primitives namespace.
Control-Description
- AttachmentsPopupElementViewDisplays and downloads the attachments defind by the
. - FieldsPopupElementViewDisplays the feature fields defined by the
. - MediaPopupElementViewDisplays the images and charts defined by the
. - TextPopupElementViewDisplays the text content defined by the
.
In addition to overwrite the control templates of this control and its child controls, the following styles are available for overriding text styling:
Resource Key-Description
- PopupViewerHeaderStyleLabel style for the main popup header.
- PopupViewerTitleStyleLabel style for the title of each popup element.
- PopupViewerCaptionStyleLabel style for the caption of each popup element.
Constructors
| Improve this Doc View SourcePopupViewer()
Initializes a new instance of the PopupViewer class.
Declaration
public PopupViewer()
Fields
| Improve this Doc View SourcePopupProperty
Identifies the PopupManager dependency property.
Declaration
public static readonly DependencyProperty PopupProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
VerticalScrollBarVisibilityProperty
Identifies the VerticalScrollBarVisibility dependency property.
Declaration
public static readonly DependencyProperty VerticalScrollBarVisibilityProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourcePopup
Gets or sets the associated PopupManager which contains popup and sketch editor.
Declaration
public Mapping.Popups.Popup? Popup { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Mapping.Popups.Popup> |
VerticalScrollBarVisibility
Gets or sets the vertical scrollbar visibility of the scrollviewer below the title.
Declaration
public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
Property Value
Type | Description |
---|---|
ScrollBarVisibility |
Methods
| Improve this Doc View SourceOnApplyTemplate()
Declaration
protected override void OnApplyTemplate()
Events
| Improve this Doc View SourceHyperlinkClicked
Raised when a link is clicked
Declaration
public event EventHandler<HyperlinkClickedEventArgs>? HyperlinkClicked
Event Type
Type | Description |
---|---|
Nullable<EventHandler<HyperlinkClickedEventArgs>> |
Remarks
By default, when an link is clicked, the default application (Browser) for the file type (if any) is launched. To override this,
listen to this event, set the Handled property to true
and perform
your own logic.
PopupAttachmentClicked
Raised when a popup attachment is clicked
Declaration
public event EventHandler<PopupAttachmentClickedEventArgs>? PopupAttachmentClicked
Event Type
Type | Description |
---|---|
Nullable<EventHandler<PopupAttachmentClickedEventArgs>> |
Remarks
By default, when an attachment is clicked, the default application for the file type (if any) is launched. To override this,
listen to this event, set the Handled property to true
and perform
your own logic.
private async void PopupAttachmentClicked(object sender, PopupAttachmentClickedEventArgs e)
{
e.Handled = true; // Prevent default launch action
await Share.Default.RequestAsync(new ShareFileRequest(new ReadOnlyFile(e.Attachment.Filename!, e.Attachment.ContentType)));
}