Skip to content

Commit

Permalink
Merge pull request #154 from reactivemarbles/CP_AddDemoAppUpdateToNet9_0
Browse files Browse the repository at this point in the history
Update to include Net 9.0 and a Demo Wpf App
  • Loading branch information
ChrisPulman authored Nov 17, 2024
2 parents 19069db + 6be5fbc commit e7d384b
Show file tree
Hide file tree
Showing 191 changed files with 2,975 additions and 87 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/BuildDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
runs-on: windows-latest
environment:
name: release
outputs:
nbgv: ${{ steps.nbgv.outputs.SemVer2 }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -40,11 +42,19 @@ jobs:
with:
distribution: 'microsoft'
java-version: '11'

- name: Setup .NET 6/8/9
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
9.0.x
- name: 'Install DotNet workloads'
shell: bash
run: |
dotnet workload install android ios tvos macos maui maccatalyst wasm-tools
dotnet workload install android ios tvos macos maui maccatalyst wasm-tools wasm-tools-net8
- name: NBGV
id: nbgv
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/BuildOnly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
windows-latest:
name: windows-latest
runs-on: windows-latest
outputs:
nbgv: ${{ steps.nbgv.outputs.SemVer2 }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -35,11 +37,19 @@ jobs:
with:
distribution: 'microsoft'
java-version: '11'

- name: Setup .NET 6/8/9
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
9.0.x
- name: 'Install DotNet workloads'
shell: bash
run: |
dotnet workload install android ios tvos macos maui maccatalyst wasm-tools
dotnet workload install android ios tvos macos maui maccatalyst wasm-tools wasm-tools-net8
- name: NBGV
id: nbgv
Expand Down
10 changes: 5 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Nullable>enable</Nullable>
<PackageIcon>CrissCross.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>Compatability with Net 6/8 and netstandard2.0</PackageReleaseNotes>
<PackageReleaseNotes>Compatability with Net 8/9 and netstandard2.0</PackageReleaseNotes>
<PackageTags>ReactiveUI;Navigation;wpf;avalonia;winforms;maui;xamforms;webview2;rx;reactive;extensions;observable;LINQ;net;netstandard</PackageTags>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
Expand All @@ -29,12 +29,12 @@
<!-- Include PDB in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>
<AvaloniaVersion>11.2.0</AvaloniaVersion>
<AvaloniaVersion>11.2.1</AvaloniaVersion>
<ReactiveUIVersion>20.1.63</ReactiveUIVersion>
<XamarinReactiveUIVersion>19.6.12</XamarinReactiveUIVersion>
<CrissCrossCoreTargetFrameworks>netstandard2.0;net6.0;net8.0</CrissCrossCoreTargetFrameworks>
<CrissCrossWinTargetFrameworks>net462;net472;net48;net6.0-windows10.0.17763.0;net8.0-windows10.0.17763.0</CrissCrossWinTargetFrameworks>
<CrissCrossWebviewTargetFrameworks>net462;net472;net48;net6.0-windows;net8.0-windows</CrissCrossWebviewTargetFrameworks>
<CrissCrossCoreTargetFrameworks>netstandard2.0;net8.0;net9.0</CrissCrossCoreTargetFrameworks>
<CrissCrossWinTargetFrameworks>net462;net472;net48;net8.0-windows10.0.17763.0;net9.0-windows10.0.17763.0</CrissCrossWinTargetFrameworks>
<CrissCrossWebviewTargetFrameworks>net462;net472;net48;net8.0-windows;net9.0-windows</CrissCrossWebviewTargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
Expand Down
4 changes: 2 additions & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ partial class Build : NukeBuild

Target Clean => _ => _
.Before(Restore)
.Executes(async () =>
.Executes(() =>
{
if (IsLocalBuild)
{
return;
}
PackagesDirectory.CreateOrCleanDirectory();
await this.InstallDotNetSdk("6.x.x", "7.x.x", "8.x.x");
////await this.InstallDotNetSdk("8.x.x", "9.x.x");
});

Target Restore => _ => _
Expand Down
4 changes: 3 additions & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" />
<PackageReference Include="Nuke.Common" Version="8.1.3" />
<PackageReference Include="Nuke.Common" Version="8.1.4" />
<PackageReference Include="CP.Nuke.BuildTools" Version="1.0.79" />
<PackageReference Include="System.Formats.Asn1" Version="9.0.0" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<ItemGroup>
<PackageReference Include="Avalonia.Android" Version="$(AvaloniaVersion)" />
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.12" />
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.13" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/CrissCross.Avalonia/CrissCross.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<ItemGroup>
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
<PackageReference Include="ReactiveUI" Version="$(ReactiveUIVersion)" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/CrissCross.MAUI.Test/CrissCross.MAUI.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.91" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.91" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/CrissCross.MAUI/CrissCross.MAUI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
Expand All @@ -18,8 +18,8 @@
<ItemGroup>
<PackageReference Include="CompiledBindings.MAUI" Version="1.0.18" />
<PackageReference Include="ReactiveUI.Maui" Version="$(ReactiveUIVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.91" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.91" />
</ItemGroup>
Expand Down
7 changes: 4 additions & 3 deletions src/CrissCross.WPF.Plot/CrissCross.WPF.Plot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
<PackageReference Include="AppBarButton.WPF" Version="1.0.2" />
<PackageReference Include="ReactiveList" Version="2.1.0" />
<PackageReference Include="ReactiveMarbles.ObservableEvents.SourceGenerator" Version="1.3.1" PrivateAssets="all" />
<PackageReference Include="ReactiveUI.SourceGenerators" Version="1.0.3" PrivateAssets="all" />
<PackageReference Include="ScottPlot.WPF" Version="5.0.43" />
<PackageReference Include="ReactiveUI.SourceGenerators" Version="2.0.17" PrivateAssets="all" />
<PackageReference Include="ScottPlot.WPF" Version="5.0.45" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<PackageReference Include="Polyfill" Version="7.2.0">
<PackageReference Include="Polyfill" Version="7.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
<Resource Include="Assets\*.png" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CrissCross.WPF.UI\CrissCross.WPF.UI.csproj" />
</ItemGroup>
Expand Down
16 changes: 16 additions & 0 deletions src/CrissCross.WPF.UI.Gallery/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Application
x:Class="CrissCross.WPF.UI.Gallery.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CrissCross.WPF.UI.Gallery"
xmlns:ui="https://github.com/reactivemarbles/CrissCross.ui"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ui:ControlsDictionary />
<ui:ThemesDictionary Theme="Light" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
10 changes: 10 additions & 0 deletions src/CrissCross.WPF.UI.Gallery/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) 2019-2024 ReactiveUI Association Incorporated. All rights reserved.
// ReactiveUI Association Incorporated licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace CrissCross.WPF.UI.Gallery;

/// <summary>
/// Interaction logic for App.xaml.
/// </summary>
public partial class App;
9 changes: 9 additions & 0 deletions src/CrissCross.WPF.UI.Gallery/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) 2019-2024 ReactiveUI Association Incorporated. All rights reserved.
// ReactiveUI Association Incorporated licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None,
ResourceDictionaryLocation.SourceAssembly)]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/CrissCross.WPF.UI.Gallery/Assets/working.gif
35 changes: 35 additions & 0 deletions src/CrissCross.WPF.UI.Gallery/CrissCross.WPF.UI.Gallery.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net9.0-windows10.0.17763.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
<IsPackable>false</IsPackable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\CrissCross.WPF.UI\CrissCross.WPF.UI.csproj" />
<PackageReference Include="ReactiveMarbles.ObservableEvents.SourceGenerator" Version="1.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ReactiveUI.SourceGenerators" Version="2.0.17" PrivateAssets="all" />
<PackageReference Include="CompiledBindings.WPF" Version="1.0.18" />
</ItemGroup>

<ItemGroup>
<Folder Include="Models\" />
</ItemGroup>

<ItemGroup>
<Resource Include="Assets\**\*.png" />
</ItemGroup>

<ItemGroup>
<Resource Include="Assets\working.gif" />
</ItemGroup>

</Project>
27 changes: 27 additions & 0 deletions src/CrissCross.WPF.UI.Gallery/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<ui:FluentNavigationWindow
x:Class="CrissCross.WPF.UI.Gallery.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CrissCross.WPF.UI.Gallery.ViewModels"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="https://github.com/reactivemarbles/CrissCross.ui"
x:Name="mainWindow"
Title="MainWindow"
Width="800"
Height="450"
d:DataContext="{d:DesignInstance Type=local:MainWindowViewModel}"
x:TypeArguments="local:MainWindowViewModel"
mc:Ignorable="d">
<ui:FluentNavigationWindow.LeftContent>
<StackPanel>
<ui:TextBox Margin="3,0,0,0" Text="{Binding Filter, ElementName=NavigationLeft, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ui:TextBox.Icon>
<ui:SymbolIcon Symbol="Search20" />
</ui:TextBox.Icon>
</ui:TextBox>
<ui:NavigationVMLeft x:Name="NavigationLeft" />
</StackPanel>
</ui:FluentNavigationWindow.LeftContent>
<Grid />
</ui:FluentNavigationWindow>
57 changes: 57 additions & 0 deletions src/CrissCross.WPF.UI.Gallery/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright (c) 2019-2024 ReactiveUI Association Incorporated. All rights reserved.
// ReactiveUI Association Incorporated licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

using System.Reactive.Disposables;
using System.Windows;
using CrissCross.WPF.UI.Appearance;
using CrissCross.WPF.UI.Gallery.ViewModels;
using ReactiveUI;
using Splat;

namespace CrissCross.WPF.UI.Gallery;

/// <summary>
/// Interaction logic for MainWindow.xaml.
/// </summary>
public partial class MainWindow : IAmBuilt
{
/// <summary>
/// The tracker property.
/// </summary>
public static readonly DependencyProperty TrackerProperty = DependencyProperty.Register(
nameof(Tracker),
typeof(Tracker),
typeof(MainWindow),
new PropertyMetadata(null));

/// <summary>
/// Initializes a new instance of the <see cref="MainWindow"/> class.
/// </summary>
public MainWindow()
{
// Watch for system theme changes
SystemThemeWatcher.Watch(this);
InitializeComponent();

// Set the data context
DataContext = ViewModel = new();
this.WhenActivated(d =>
{
// Set the tracker
var tracker = Locator.Current.GetService<Tracker>();
tracker?.Track(this);
SetCurrentValue(TrackerProperty, tracker);
// Bind the view model
this.OneWayBind(ViewModel, vm => vm.ApplicationTitle, v => v.Title).DisposeWith(d);
this.OneWayBind(ViewModel, vm => vm.NavigationModels, v => v.NavigationLeft.ItemsSource).DisposeWith(d);
// Navigate to the main view
this.NavigateToView<MainViewModel>();
});

// Dispose the view model on close
Closing += (s, e) => ViewModel.Dispose();
}
}
Loading

0 comments on commit e7d384b

Please sign in to comment.