diff --git a/doc/ReleaseNotes/_ReleaseNotes.md b/doc/ReleaseNotes/_ReleaseNotes.md index 9a76348aa6a8..a1390d339243 100644 --- a/doc/ReleaseNotes/_ReleaseNotes.md +++ b/doc/ReleaseNotes/_ReleaseNotes.md @@ -85,8 +85,8 @@ * `Grid` now supports `ColumnDefinition.MinWidth` and `MaxWidth` and `RowDefinition.MinHeight` and `MaxHeight` (#1032) * Implement the `PivotPanel` measure/arrange to allow text wrapping in pivot items * [Wasm] Add `PathIcon` support +* [iOS] Fix items dependency property propagation in ListView items * [Wasm] Add UI Testing support through for `Uno.UI.Helpers.Automation.GetDependencyPropertyValue`\ -* Add automated UI testing support for every PR ### Breaking Changes * The `WebAssemblyRuntime.InvokeJSUnmarshalled` method with three parameters has been removed. diff --git a/src/SamplesApp/UITests.Shared/UITests.Shared.projitems b/src/SamplesApp/UITests.Shared/UITests.Shared.projitems index 86159d7da38e..95162145f7c1 100644 --- a/src/SamplesApp/UITests.Shared/UITests.Shared.projitems +++ b/src/SamplesApp/UITests.Shared/UITests.Shared.projitems @@ -1,4 +1,4 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) @@ -833,6 +833,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -2437,6 +2441,7 @@ ListViewResizableText.xaml + ListView_Infinite_Breadth.xaml @@ -3515,8 +3520,8 @@ NavigationView_TopNavigation.xaml - - PivotSimpleTest.xaml + + ListView_DataContext_Propagation.xaml MessageDialog.xaml @@ -3720,4 +3725,4 @@ - + \ No newline at end of file diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ListView/ListView_DataContext_Propagation.xaml b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ListView/ListView_DataContext_Propagation.xaml new file mode 100644 index 000000000000..6870dba63136 --- /dev/null +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ListView/ListView_DataContext_Propagation.xaml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + Item 01 + Item 02 + + + + diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ListView/ListView_DataContext_Propagation.xaml.cs b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ListView/ListView_DataContext_Propagation.xaml.cs new file mode 100644 index 000000000000..cb331d9872ed --- /dev/null +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/ListView/ListView_DataContext_Propagation.xaml.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Uno.UI.Samples.Controls; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; + +// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236 + +namespace UITests.Shared.Windows_UI_Xaml_Controls.ListView +{ + [SampleControlInfo("ListView", "ListView_DataContext_Propagation")] + public sealed partial class ListView_DataContext_Propagation : UserControl + { + public ListView_DataContext_Propagation() + { + this.InitializeComponent(); + } + + private void Button_Click(object sender, RoutedEventArgs e) + { + topGrid.DataContext = "Button Clicked " + sender.ToString(); + } + } +} diff --git a/src/Uno.UI/Controls/BindableImageView.Android.cs b/src/Uno.UI/Controls/BindableImageView.Android.cs index b780011fb24d..928238d7f3a0 100644 --- a/src/Uno.UI/Controls/BindableImageView.Android.cs +++ b/src/Uno.UI/Controls/BindableImageView.Android.cs @@ -24,7 +24,6 @@ using Java.Lang.Ref; using System.IO; using Math = System.Math; -using System.Drawing; using Size = System.Drawing.Size; using System.Reflection; using Windows.UI.Core; diff --git a/src/Uno.UI/UI/Xaml/Controls/BorderLayerRenderer.Android.cs b/src/Uno.UI/UI/Xaml/Controls/BorderLayerRenderer.Android.cs index 0eaf19abe43f..3a07b0e2edc4 100644 --- a/src/Uno.UI/UI/Xaml/Controls/BorderLayerRenderer.Android.cs +++ b/src/Uno.UI/UI/Xaml/Controls/BorderLayerRenderer.Android.cs @@ -10,7 +10,6 @@ using Windows.UI.Xaml.Media; using System; using System.Collections.Generic; -using System.Drawing; using Uno.Disposables; using System.Text; using System.Threading; @@ -51,7 +50,7 @@ public void UpdateLayers( // This is required because android Height and Width are hidden by Control. var baseView = view as View; - Size targetSize = new Size(baseView.Width, baseView.Height); + var targetSize = new global::System.Drawing.Size(baseView.Width, baseView.Height); var drawArea = new Windows.Foundation.Rect(0, 0, targetSize.Width, targetSize.Height); var newState = new LayoutState(drawArea, background, borderThickness, borderBrush, cornerRadius, padding); var previousLayoutState = _currentState; @@ -239,7 +238,7 @@ Action onImageSet { using (var strokePaint = new Paint(borderBrush.GetStrokePaint(drawArea))) { - var overlay = GetOverlayDrawable(strokePaint, physicalBorderThickness, new Size((int)drawArea.Width, (int)drawArea.Height), path); + var overlay = GetOverlayDrawable(strokePaint, physicalBorderThickness, new global::System.Drawing.Size((int)drawArea.Width, (int)drawArea.Height), path); if (overlay != null) { @@ -274,7 +273,7 @@ Action onImageSet //TODO: Handle case that BorderBrush is an ImageBrush using (var strokePaint = borderBrush.GetStrokePaint(drawArea)) { - var overlay = GetOverlayDrawable(strokePaint, physicalBorderThickness, new Size(view.Width, view.Height)); + var overlay = GetOverlayDrawable(strokePaint, physicalBorderThickness, new global::System.Drawing.Size(view.Width, view.Height)); if (overlay != null) { @@ -423,7 +422,7 @@ private static void ExecuteWithNoRelayout(BindableView target, Action, Bitmap> _resourceCache = new Dictionary, Bitmap>(); + private static Dictionary, Bitmap> _resourceCache = new Dictionary, Bitmap>(); /// /// Defines an asynchronous image loader handler. @@ -35,7 +34,7 @@ public partial class ImageSource /// The image uri /// An optional target decoding size /// A Bitmap instance - public delegate Task ImageLoaderHandler(CancellationToken ct, string uri, Android.Widget.ImageView imageView, Size? targetSize); + public delegate Task ImageLoaderHandler(CancellationToken ct, string uri, Android.Widget.ImageView imageView, global::System.Drawing.Size? targetSize); /// /// Provides a optional external image loader. @@ -131,7 +130,7 @@ internal async Task Open(CancellationToken ct, Android.Widget.ImageView options.InJustDecodeBounds = true; var targetSize = UseTargetSize && targetWidth != null && targetHeight != null - ? (Size?)new Size(targetWidth.Value, targetHeight.Value) + ? (global::System.Drawing.Size?)new global::System.Drawing.Size(targetWidth.Value, targetHeight.Value) : null; if (ResourceId.HasValue) @@ -273,7 +272,7 @@ private static bool IsContactUri(Uri uri) /// /// /// - private async Task FetchResourceWithDownsampling(CancellationToken ct, int resourceId, Size? targetSize) + private async Task FetchResourceWithDownsampling(CancellationToken ct, int resourceId, global::System.Drawing.Size? targetSize) { var key = Tuple.Create(resourceId, targetSize);