diff --git a/build/workflow/copilot/restore-solution.sh b/build/workflow/copilot/restore-solution.sh
index afd36b48c..9fd34658c 100644
--- a/build/workflow/copilot/restore-solution.sh
+++ b/build/workflow/copilot/restore-solution.sh
@@ -1,5 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
+# Create a desktop-only crosstargeting override for build pipelines
+cat > "src/crosstargeting_override.props" << 'EOF'
+
+
+ true
+ net10.0-desktop
+ net9.0
+
+
+EOF
+
+cd src
+
+dotnet workload restore
+dotnet workload install android
+
# Restore solution packages to ensure dependencies are ready for subsequent steps
-dotnet restore src/Uno.Toolkit.sln -p:SamplesTargetFrameworkOverride=net9.0-desktop -p:DisableMobileTargets=true
\ No newline at end of file
+dotnet restore Uno.Toolkit.sln
+
+# Preload the dev server tool
+dotnet dnx -y uno.devserver --prerelease -- start -l trace
+
+sleep 20
+
+dotnet dnx -y uno.devserver --prerelease -- stop -l trace
+
diff --git a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/App.xaml.Navigation.cs b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/App.xaml.Navigation.cs
index fd31250d4..437e081a7 100644
--- a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/App.xaml.Navigation.cs
+++ b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/App.xaml.Navigation.cs
@@ -1,5 +1,4 @@
using System.Reflection;
-using System.Reflection;
using Uno.Extensions;
using MUXC = Microsoft.UI.Xaml.Controls;
@@ -10,6 +9,7 @@ partial class App
{
private static Sample[] _samples;
private static IDictionary _nestedSampleMap;
+ private Content.SettingsPage _settingsPage;
///
/// Invoked when Navigation to a certain page fails
@@ -124,7 +124,15 @@ private void OnNavigationItemInvoked(MUXC.NavigationView sender, MUXC.Navigation
}
else if (e.IsSettingsInvoked)
{
- _shell.ActivateDebugPanel();
+ // Cache the settings page to avoid recreating it each time
+ if (_settingsPage == null)
+ {
+ _settingsPage = new Content.SettingsPage();
+ }
+
+ // Clear selected item to avoid having a sample highlighted while Settings is displayed
+ _shell.NavigationView.SelectedItem = null;
+ _shell.NavigationView.Content = _settingsPage;
}
}
diff --git a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml
new file mode 100644
index 000000000..ef242654a
--- /dev/null
+++ b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml.cs b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml.cs
new file mode 100644
index 000000000..81c14e961
--- /dev/null
+++ b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml.cs
@@ -0,0 +1,121 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+using Uno.Extensions;
+using Uno.UI.Extensions;
+using Windows.ApplicationModel.DataTransfer;
+
+namespace Uno.Toolkit.Samples.Content
+{
+ public sealed partial class SettingsPage : Page
+ {
+ public SettingsPage()
+ {
+ this.InitializeComponent();
+
+ UpdateAppInfoSafe();
+ }
+
+ private void UpdateAppInfoSafe()
+ {
+ // this is called in ctor, dont fail creating the page and the subsequent navigation if anything went wrong
+ try
+ {
+ UpdateAppInfo();
+ }
+ catch (Exception) { }
+ }
+ private void UpdateAppInfo()
+ {
+ // Set version text
+ VersionTextBlock.Text = Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "Unknown";
+
+ // Set framework information
+ FrameworkTextBlock.Text = RuntimeInformation.FrameworkDescription;
+
+ // Set platform information
+#if __ANDROID__
+ PlatformTextBlock.Text = "Android";
+#elif __IOS__
+ PlatformTextBlock.Text = "iOS";
+#elif __WASM__
+ PlatformTextBlock.Text = "WebAssembly";
+#elif __MACOS__
+ PlatformTextBlock.Text = "macOS";
+#elif WINDOWS_UWP
+ PlatformTextBlock.Text = "UWP";
+#elif WINDOWS || WINDOWS_WINUI
+ PlatformTextBlock.Text = "Windows (WinUI)";
+#else
+ // For Skia desktop builds, detect at runtime
+ // Check if we're running on a desktop platform (Windows, Linux, macOS) but not in browser
+ var isDesktop = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ||
+ RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ||
+ RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
+
+ if (isDesktop)
+ {
+ PlatformTextBlock.Text = "Skia (Desktop)";
+ }
+ else
+ {
+ PlatformTextBlock.Text = "Unknown";
+ }
+#endif
+
+ // Set packages information
+ var assemblyMarkerTypes = new[]
+ {
+ typeof(Microsoft.UI.Xaml.Application),
+ typeof(Uno.Material.MaterialTheme),
+ // typeof(Uno.Cupertino.CupertinoResources),
+ typeof(Uno.Toolkit.UI.ToolkitResources),
+ };
+ PackageVersionsTextBlock.Text = string.Join("\n", assemblyMarkerTypes
+ .Select(x =>
+ {
+ var name = x.Assembly.GetName();
+ var version =
+ (x.Assembly.GetCustomAttribute()?.InformationalVersion?.Trim() is { Length: > 0 } aiv ? aiv : null) ??
+ name.Version?.ToString() ??
+ "Unknown";
+
+ return $"{name.Name}: {version}";
+ })
+ );
+ }
+
+ private void EnableDebugPanel(object sender, RoutedEventArgs e)
+ {
+ if (this.FindFirstAncestor() is { } shell)
+ {
+ shell.EnableDebugPanel();
+ }
+ }
+
+ private void CopyInfo(object sender, RoutedEventArgs e)
+ {
+ var text = string.Join('\n', AppInfoPanel.Children.OfType()
+ .Select(x =>
+ {
+ var label = (x.Children.ElementAtOrDefault(0) as TextBlock)?.Text ?? "???";
+ var value = string.Join('\n', x.Children.Skip(1)
+ .Select(x => x switch
+ {
+ TextBlock tblock => tblock.Text,
+ TextBox tbox => tbox.Text,
+ _ => null,
+ })
+ .Where(x => !string.IsNullOrEmpty(x))
+ );
+
+ return value.Split(['\n', '\r']) is { Length: > 1 } multilines
+ ? string.Join('\n', [$"{label}:", .. multilines.Select(x => " " + x)])
+ : $"{label}: {value}";
+ })
+ );
+
+ Clipboard.SetContent(new DataPackage().Apply(x => x.SetText(text)));
+ Console.WriteLine(text);
+ }
+ }
+}
diff --git a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Shell.xaml b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Shell.xaml
index f0ee9d9ce..5c4855933 100644
--- a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Shell.xaml
+++ b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Shell.xaml
@@ -56,20 +56,20 @@
Grid.RowSpan="2"
Visibility="Collapsed" />
-
+
+
+ VerticalAlignment="Bottom"
+ Visibility="Collapsed">
-
-
+
+
diff --git a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Shell.xaml.cs b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Shell.xaml.cs
index fecf1941b..570a53f52 100644
--- a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Shell.xaml.cs
+++ b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Shell.xaml.cs
@@ -12,12 +12,14 @@ namespace Uno.Toolkit.Samples
{
public sealed partial class Shell : UserControl
{
+ public static Shell GetForCurrentView() => (Shell)(App.Instance.MainWindow.Content as ExtendedSplashScreen)!.Content;
+
+ public MUXC.NavigationView NavigationView => NavigationViewControl;
+
public Shell()
{
this.InitializeComponent();
- this.Loaded += OnLoaded;
-
NestedSampleFrame.RegisterPropertyChangedCallback(ContentControl.ContentProperty, OnNestedSampleFrameChanged);
#if SYS_NAV_MGR_SUPPORTED
@@ -25,22 +27,6 @@ public Shell()
#endif
}
- public static Shell GetForCurrentView() => (Shell)(App.Instance.MainWindow.Content as ExtendedSplashScreen)!.Content;
-
- public MUXC.NavigationView NavigationView => NavigationViewControl;
-
- private void OnLoaded(object sender, RoutedEventArgs e)
- {
-#if DEBUG && false
- ActivateDebugPanel();
-#endif
- }
-
- internal void ActivateDebugPanel()
- {
- this.FindName("DebugPanel"); // materialize x:Load=false element
- }
-
private void ToggleButton_Click(object sender, RoutedEventArgs e)
{
if (this.XamlRoot.Content is FrameworkElement root)
@@ -151,6 +137,11 @@ public void ExitNestedSample()
}
}
+ internal void EnableDebugPanel()
+ {
+ DebugPanel.Visibility = Visibility.Visible;
+ }
+
private void DebugVT(object sender, RoutedEventArgs e)
{
object FindViewOfInterest()
@@ -212,9 +203,12 @@ object FindViewOfInterest()
//if (Debugger.IsAttached) Debugger.Break();
}
- private void DebugVTAsync(object sender, RoutedEventArgs e)
+ private async void DebugVTAsync(object sender, RoutedEventArgs e)
{
- VisualStateManager.GoToState(NavigationView, "ListSizeFull", useTransitions: false);
+ // some wait time to let you open the flyout or navigate to a "nested" page
+ await Task.Delay(3000);
+
+ DebugVT(sender, e);
}
private void NavigationViewControl_DisplayModeChanged(MUXC.NavigationView sender, MUXC.NavigationViewDisplayModeChangedEventArgs e)
diff --git a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.csproj b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.csproj
index 5e0c93e1b..93660a33f 100644
--- a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.csproj
+++ b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.csproj
@@ -1,4 +1,6 @@
+
+
$(SamplesTargetFrameworkOverride)
net10.0-android;net10.0-ios;net10.0-maccatalyst;net10.0-windows10.0.26100;net10.0-browserwasm;net10.0-desktop