diff --git a/src/Samples/Toolkit.SampleApp.Maui/Toolkit.SampleApp.Maui.csproj b/src/Samples/Toolkit.SampleApp.Maui/Toolkit.SampleApp.Maui.csproj index e6f899474..107fc4dc0 100644 --- a/src/Samples/Toolkit.SampleApp.Maui/Toolkit.SampleApp.Maui.csproj +++ b/src/Samples/Toolkit.SampleApp.Maui/Toolkit.SampleApp.Maui.csproj @@ -10,6 +10,8 @@ enable enable + $(WarningsAsErrors);IL2036;IL2037 + Toolkit.SampleApp.Maui diff --git a/src/Toolkit/Toolkit.Maui/OverviewMap/OverviewMap.cs b/src/Toolkit/Toolkit.Maui/OverviewMap/OverviewMap.cs index cafd13861..e9f75b0dc 100644 --- a/src/Toolkit/Toolkit.Maui/OverviewMap/OverviewMap.cs +++ b/src/Toolkit/Toolkit.Maui/OverviewMap/OverviewMap.cs @@ -33,7 +33,7 @@ public class OverviewMap : TemplatedView private MapView? _overviewMapView; - [DynamicDependency(nameof(Esri.ArcGISRuntime.Mapping.Map.LoadStatus), "Esri.ArcGISRuntime.Mapping.Map", "Esri.ArcGISRuntime")] + [DynamicDependency(nameof(Esri.ArcGISRuntime.Mapping.GeoModel.LoadStatus), "Esri.ArcGISRuntime.Mapping.GeoModel", "Esri.ArcGISRuntime")] static OverviewMap() { DefaultControlTemplate = new ControlTemplate(() => diff --git a/src/Toolkit/Toolkit/UI/Controls/PopupViewer/AttachmentsPopupElementView.Maui.cs b/src/Toolkit/Toolkit/UI/Controls/PopupViewer/AttachmentsPopupElementView.Maui.cs index 5fb7ffe79..99b5e9fe2 100644 --- a/src/Toolkit/Toolkit/UI/Controls/PopupViewer/AttachmentsPopupElementView.Maui.cs +++ b/src/Toolkit/Toolkit/UI/Controls/PopupViewer/AttachmentsPopupElementView.Maui.cs @@ -73,11 +73,11 @@ private static object BuildDefaultTemplate() } - [DynamicDependency(nameof(AttachmentViewModel.Thumbnail), "Esri.ArcGISRuntime.Toolkit.Maui.Primitives.AttachmentViewModel","Esri.ArcGISRuntime")] - [DynamicDependency(nameof(AttachmentViewModel.Name), "Esri.ArcGISRuntime.Toolkit.Maui.Primitives.AttachmentViewModel", "Esri.ArcGISRuntime")] - [DynamicDependency(nameof(AttachmentViewModel.Size), "Esri.ArcGISRuntime.Toolkit.Maui.Primitives.AttachmentViewModel", "Esri.ArcGISRuntime")] - [DynamicDependency(nameof(AttachmentViewModel.IsDownloadButtonVisible), "Esri.ArcGISRuntime.Toolkit.Maui.Primitives.AttachmentViewModel", "Esri.ArcGISRuntime")] - [DynamicDependency(nameof(AttachmentViewModel.IsDownloading), "Esri.ArcGISRuntime.Toolkit.Maui.Primitives.AttachmentViewModel", "Esri.ArcGISRuntime")] + [DynamicDependency(nameof(AttachmentViewModel.Thumbnail), "Esri.ArcGISRuntime.Toolkit.Maui.Primitives.AttachmentsPopupElementView.AttachmentViewModel", "Esri.ArcGISRuntime.Toolkit.Maui")] + [DynamicDependency(nameof(AttachmentViewModel.Name), "Esri.ArcGISRuntime.Toolkit.Maui.Primitives.AttachmentsPopupElementView.AttachmentViewModel", "Esri.ArcGISRuntime.Toolkit.Maui")] + [DynamicDependency(nameof(AttachmentViewModel.Size), "Esri.ArcGISRuntime.Toolkit.Maui.Primitives.AttachmentsPopupElementView.AttachmentViewModel", "Esri.ArcGISRuntime.Toolkit.Maui")] + [DynamicDependency(nameof(AttachmentViewModel.IsDownloadButtonVisible), "Esri.ArcGISRuntime.Toolkit.Maui.Primitives.AttachmentsPopupElementView.AttachmentViewModel", "Esri.ArcGISRuntime.Toolkit.Maui")] + [DynamicDependency(nameof(AttachmentViewModel.IsDownloading), "Esri.ArcGISRuntime.Toolkit.Maui.Primitives.AttachmentsPopupElementView.AttachmentViewModel", "Esri.ArcGISRuntime.Toolkit.Maui")] private static object BuildDefaultItemTemplate() { Grid layout = new Grid(); @@ -95,7 +95,7 @@ private static object BuildDefaultItemTemplate() layout.Add(image); image.SetBinding(Image.SourceProperty, new Binding(nameof(AttachmentViewModel.Thumbnail))); Grid.SetRowSpan(image, 2); - + Label name = new Label() { VerticalOptions = LayoutOptions.End }; name.SetBinding(Label.TextProperty, nameof(AttachmentViewModel.Name)); Grid.SetColumn(name, 1); @@ -113,7 +113,7 @@ private static object BuildDefaultItemTemplate() Grid.SetColumn(image2, 2); Grid.SetRowSpan(image2, 2); layout.Add(image2); - + ActivityIndicator indicator = new ActivityIndicator() { WidthRequest = 24, HeightRequest = 24, IsRunning = true }; indicator.SetBinding(ActivityIndicator.IsRunningProperty, new Binding(nameof(AttachmentViewModel.IsDownloading))); Grid.SetColumn(indicator, 2); @@ -210,7 +210,7 @@ public string Size else return $"{Math.Round(size / 1024d / 1024d, 1)} MB"; } - } + } private void Attachment_PropertyChanged(object? sender, PropertyChangedEventArgs e) { @@ -241,9 +241,9 @@ public ImageSource? Thumbnail return _thumbnail; } } - + public bool IsDownloadButtonVisible => !Attachment.IsLocal && Attachment.LoadStatus != LoadStatus.Loaded && Attachment.LoadStatus != LoadStatus.Loading; - + public bool IsDownloading => !Attachment.IsLocal && Attachment.LoadStatus == LoadStatus.Loading; private void CreateThumbnail()