From 69189ba887044c49d4c4f7d15c1a1dbe850d6aa5 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Sat, 14 Mar 2020 14:21:05 +0100 Subject: [PATCH] fix: Fixed samples app compilation due to generators --- .../TreeView/TreeViewItemSource.cs | 4 ++-- .../TreeView/TreeViewNode2.cs | 2 +- .../TreeView/TreeViewPage.xaml | 2 +- .../TreeView/TreeViewPage.xaml.cs | 21 ++++++++++--------- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewItemSource.cs b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewItemSource.cs index 353524d295c8..94a82f67257c 100644 --- a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewItemSource.cs +++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewItemSource.cs @@ -5,9 +5,9 @@ using System.Collections.ObjectModel; using System.ComponentModel; -namespace UITests.Shared.Microsoft_UI_Xaml_Controls.TreeViewTests +namespace MUX.UITests.Shared.Microsoft_UI_Xaml_Controls.TreeViewTests { - public class TreeViewItemSource : INotifyPropertyChanged + public partial class TreeViewItemSource : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public String Content { get; set; } diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewNode2.cs b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewNode2.cs index 540c6db10e75..c0aef3a02ba5 100644 --- a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewNode2.cs +++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewNode2.cs @@ -8,7 +8,7 @@ namespace UITests.Shared.Microsoft_UI_Xaml_Controls.TreeViewTests { // An empty class to test TreeViewNode inheritance - class TreeViewNode2 : TreeViewNode + public partial class TreeViewNode2 : TreeViewNode { } diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewPage.xaml b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewPage.xaml index 80bbc3e73dc1..2db766e2a3af 100644 --- a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewPage.xaml +++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewPage.xaml @@ -5,7 +5,7 @@ x:Name="TwoPaneViewTestPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:UITests.Shared.Microsoft_UI_Xaml_Controls.TreeViewTests" + xmlns:local="using:MUX.UITests.Shared.Microsoft_UI_Xaml_Controls.TreeViewTests" xmlns:xamarin="http://uno.ui/xamarin" xmlns:muxcontrols="using:Microsoft.UI.Xaml.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewPage.xaml.cs b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewPage.xaml.cs index 0a96eeebd7b3..f77c74b53d69 100644 --- a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewPage.xaml.cs +++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/TreeView/TreeViewPage.xaml.cs @@ -26,6 +26,7 @@ using System.Threading.Tasks; using Uno.UI.Samples.Controls; using MUXControlsTestApp.Utilities; +using MUX.UITests.Shared.Microsoft_UI_Xaml_Controls.TreeViewTests; namespace UITests.Shared.Microsoft_UI_Xaml_Controls.TreeViewTests { @@ -95,7 +96,7 @@ private async Task> PrepareItemsSourceA }); } - protected override void OnNavigatedFrom(NavigationEventArgs e) + protected internal override void OnNavigatedFrom(NavigationEventArgs e) { // Unset all override flags to avoid impacting subsequent tests //TODO @@ -517,7 +518,7 @@ private void SetupCustomDragUIOverride_Click(object sender, RoutedEventArgs e) AutomationProperties.SetName(lastItem, "CustomDragUIOverrideDropTarget"); } - private void Item_DragEnter(object sender, DragEventArgs e) + private void Item_DragEnter(object sender, Windows.UI.Xaml.DragEventArgs e) { e.DragUIOverride.Caption = "test caption"; e.DragUIOverride.IsCaptionVisible = true; @@ -526,7 +527,7 @@ private void Item_DragEnter(object sender, DragEventArgs e) e.Handled = true; } - private async void TreeView_Drop(object sender, DragEventArgs e) + private async void TreeView_Drop(object sender, Windows.UI.Xaml.DragEventArgs e) { try { @@ -546,7 +547,7 @@ private void Draggable_DragStarting(UIElement sender, DragStartingEventArgs args Results.Text = "Drag started"; } - private void TreeView_DragOver(object sender, DragEventArgs e) + private void TreeView_DragOver(object sender, Windows.UI.Xaml.DragEventArgs e) { e.AcceptedOperation = DataPackageOperation.Copy; } @@ -557,12 +558,12 @@ private void SizeTreeViewsForDrags_Click(object sender, RoutedEventArgs e) TestTreeView2.Height = 200; } - private void DropTarget_DragOver(object sender, DragEventArgs e) + private void DropTarget_DragOver(object sender, Windows.UI.Xaml.DragEventArgs e) { e.AcceptedOperation = DataPackageOperation.Copy; } - private async void DropTarget_Drop(object sender, DragEventArgs e) + private async void DropTarget_Drop(object sender, Windows.UI.Xaml.DragEventArgs e) { try { @@ -701,13 +702,13 @@ private void SetupDragDropHandlersForApiTest_Click(object sender, RoutedEventArg ContentModeTestTreeView2.Drop += DropForApiTest; } - private void DragEnterForApiTest(object sender, DragEventArgs args) + private void DragEnterForApiTest(object sender, Windows.UI.Xaml.DragEventArgs args) { args.AcceptedOperation = DataPackageOperation.Copy; Results.Text = "DragEnter"; } - private void DragOverForApiTest(object sender, DragEventArgs args) + private void DragOverForApiTest(object sender, Windows.UI.Xaml.DragEventArgs args) { args.AcceptedOperation = DataPackageOperation.Copy; if (!Results.Text.Contains("DragOver")) @@ -716,12 +717,12 @@ private void DragOverForApiTest(object sender, DragEventArgs args) } } - private void DragLeaveForApiTest(object sender, DragEventArgs args) + private void DragLeaveForApiTest(object sender, Windows.UI.Xaml.DragEventArgs args) { Results.Text += "->DragLeave"; } - private void DropForApiTest(object sender, DragEventArgs args) + private void DropForApiTest(object sender, Windows.UI.Xaml.DragEventArgs args) { Results.Text += "->Drop"; }