File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ namespace Esri.ArcGISRuntime.Toolkit.Primitives
26
26
/// </summary>
27
27
public partial class PopupElementItemsControl : ItemsControl
28
28
{
29
+ private static DataTemplate UnsupportedPopupElementTemplate = new DataTemplate ( ) ;
30
+
29
31
/// <inheritdoc />
30
32
protected override void PrepareContainerForItemOverride ( DependencyObject element , object item )
31
33
{
@@ -59,6 +61,10 @@ protected override void PrepareContainerForItemOverride(DependencyObject element
59
61
// always returned as TextPopupElement.
60
62
Debug . Assert ( false ) ;
61
63
}
64
+ else
65
+ {
66
+ presenter . ContentTemplate = UnsupportedPopupElementTemplate ; // Renders empty / skips
67
+ }
62
68
}
63
69
}
64
70
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ public class PopupElementTemplateSelector : DataTemplateSelector
33
33
private static DataTemplate DefaultMediaPopupElementTemplate ;
34
34
private static DataTemplate DefaultFieldsPopupElementTemplate ;
35
35
private static DataTemplate DefaultAttachmentsPopupElementTemplate ;
36
-
36
+ private static DataTemplate UnsupportedPopupElementTemplate ;
37
+
37
38
static PopupElementTemplateSelector ( )
38
39
{
39
40
DefaultTextPopupElementTemplate = new DataTemplate ( ( ) =>
@@ -61,6 +62,10 @@ static PopupElementTemplateSelector()
61
62
view . SetBinding ( AttachmentsPopupElementView . ElementProperty , Binding . SelfPath ) ;
62
63
return view ;
63
64
} ) ;
65
+ UnsupportedPopupElementTemplate = new DataTemplate ( ( ) =>
66
+ {
67
+ return new Grid ( ) { IsVisible = false } ;
68
+ } ) ;
64
69
}
65
70
66
71
/// <summary>
@@ -104,7 +109,7 @@ protected override DataTemplate OnSelectTemplate(object item, BindableObject ele
104
109
// always returned as TextPopupElement.
105
110
Debug . Assert ( false ) ;
106
111
}
107
- return new DataTemplate ( ) ;
112
+ return UnsupportedPopupElementTemplate ;
108
113
}
109
114
110
115
/// <summary>
You can’t perform that action at this time.
0 commit comments