Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Avalonia v11.0 Preview 5 #39

Merged
merged 7 commits into from
Feb 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 0 additions & 134 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,47 +117,6 @@ _TeamCity*
*.coverage
*.coveragexml

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
Expand All @@ -170,14 +129,6 @@ PublishScripts/
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Expand All @@ -190,24 +141,6 @@ _pkginfo.txt
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
Expand All @@ -216,73 +149,6 @@ Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf
*.ndf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/

# Typescript v1 declaration files
typings/

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# JetBrains Rider
.idea/
*.sln.iml

# CodeRush
.cr/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc

# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

# Telerik's JustMock configuration file
*.jmconfig

# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
16 changes: 16 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

Change log history for Prism.Avalonia

## v8.1.97.3-preview.11.5 (2022-02-??)

* Added support for Avalonia v11.0 Preview 5
* IDialogWindow implements `WindowClosingEventArgs`. See, [Issue #9524](https://github.com/AvaloniaUI/Avalonia/issues/9524), [PR #9715](https://github.com/AvaloniaUI/Avalonia/pull/9715)
* Avalonia interface objects deprecated - [PR #9553](https://github.com/AvaloniaUI/Avalonia/pull/9553)
* Samples:
* Upgraded sample projects to support latest Avalonia version
* SampleDialogApp - Added MessageBox example
* Theme imp


## v8.1.97.3-preview.11.4 (2022-02-03)

* Added support for Avalonia v11.0 Preview 4
* Upgraded sample projects to support latest Avalonia version

## v8.1.97.1 - 2022-12-08

* NEW: Automatically performs `AutoWireViewModel`
Expand Down
2 changes: 2 additions & 0 deletions Prism.Avalonia.sln
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
ChangeLog.md = ChangeLog.md
README.md = README.md
Settings.XamlStyler = Settings.XamlStyler
Upgrading-to-Avalonia-11.md = Upgrading-to-Avalonia-11.md
EndProjectSection
EndProject
Global
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@

[Prism.Avalonia](https://github.com/AvaloniaCommunity/Prism.Avalonia) provides your [Avalonia](https://avaloniaui.net/) apps with [Prism framework](https://github.com/PrismLibrary/Prism) support so you can navigate and perform dependency injection easier than before.

| Package | NuGet |
|-|-|
| Prism.Avalonia | [![Prism.Avalonia NuGet Badge](https://buildstats.info/nuget/Prism.Avalonia?dWidth=70&includePreReleases=true)](https://www.nuget.org/packages/Prism.Avalonia/)
| Prism.DryIoc.Avalonia | [![Prism.DryIoc.Avalonia NuGet Badge](https://buildstats.info/nuget/Prism.DryIoc.Avalonia?dWidth=70&includePreReleases=true)](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/)
| Package | Stable | Preview
|-|-|-|
| Prism.Avalonia | [![Prism.Avalonia NuGet Badge](https://buildstats.info/nuget/Prism.Avalonia?dWidth=70&includePreReleases=false)](https://www.nuget.org/packages/Prism.Avalonia/) | [![Prism.Avalonia NuGet Badge](https://buildstats.info/nuget/Prism.Avalonia?dWidth=70&includePreReleases=true)](https://www.nuget.org/packages/Prism.Avalonia/)
| Prism.DryIoc.Avalonia | [![Prism.DryIoc.Avalonia NuGet Badge](https://buildstats.info/nuget/Prism.DryIoc.Avalonia?dWidth=70&includePreReleases=false)](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/) | [![Prism.DryIoc.Avalonia NuGet Badge](https://buildstats.info/nuget/Prism.DryIoc.Avalonia?dWidth=70&includePreReleases=true)](https://www.nuget.org/packages/Prism.DryIoc.Avalonia/)



Prism.Avalonia's logic and development approach is similar to that of [Prism for WPF](https://github.com/PrismLibrary/Prism/) so you can get started right away with Prism for Avalonia!

## Changes

Be sure to check out the [ChangeLog.md] and [Upgrading-to-Avalonia-11.md] when upgrading your NuGet packages

## Install

Add the DryIoc package to your project:
Expand Down Expand Up @@ -53,7 +59,7 @@ public class App : PrismApplication
containerRegistry.RegisterForNavigation<SidebarView, SidebarViewModel>();
}

protected override IAvaloniaObject CreateShell()
protected override AvaloniaObject CreateShell()
{
if (IsSingleViewLifetime)
return Container.Resolve<MainControl>(); // For Linux Framebuffer or DRM
Expand Down
53 changes: 53 additions & 0 deletions Upgrading-to-Avalonia-11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Upgrading to Avalonia v11 Preview

This document outlines the path to upgrading your projects from Avalonia v0.10.18 to v11.xx. Please read over this document and suggest changes to help improve the documentation. After all, we learn from one another.

Check out Avalonia's [Breaking Changes](https://github.com/AvaloniaUI/Avalonia/wiki/Breaking-Changes) wiki page for more information

## 11.0 Preview 5

* NEW: IDialogWindow now implements `WindowClosingEventArgs`.
* See, [Issue #9524](https://github.com/AvaloniaUI/Avalonia/issues/9524), [PR #9715](https://github.com/AvaloniaUI/Avalonia/pull/9715)
* This affects `IDialogWindow` implementation of `public event EventHandler<WindowClosingEventArgs>? Closing;`
* Deprecation of redundant interfaces.
* See, [PR #9553](https://github.com/AvaloniaUI/Avalonia/pull/9553)
* I.E. `IAvaloniaObject` -> `AvalonObject`, and more.
* Avalonia.ReactiveUI.Events.
* See, [PR #5423](https://github.com/AvaloniaUI/Avalonia/pull/5423)
* Themes: Both Avalonia.Themes.Fluent and Avalonia.Themes.Simple (formally, Default) are not a part of the main Avalonia nuget package anymore. You need to add a PackageReference to include either of these packages or both. For more details, see #5593

### Known Issues

* [WindowNotificationManager Pop-Ups are no longer working in 11 Preview 5](https://github.com/AvaloniaUI/Avalonia/issues/10216)
* Themes in sample are showing up cloudy
* Selected ListView item still appears after clearing the List
* **STATUS:** _Needs reported_
* **Reproduce:**
* Add items to ListView to fill 2+ pages
* Scroll down to select item
* Clear list
* Resize window to show area previous now shown
* **Result:**
* Selected item still appears in list despite items removed from collection

### Themes

When using Fluent theme, you no longer has a `Mode` attribute.

```xml
<!-- New -->
<FluentTheme />

<!-- Old -->
<FluentTheme Mode="Light" />
```


## 11.0 Preview 4

### DataTemplates

DataTemplates now require a `DataType` to be defined. This actually improves intellisense of your XAML and loading times with MVVM.

As a workaround for ListViews, you can use the `ItemTemplate` which does not require the definition of a `DataType`.

12 changes: 12 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Build script for generating NuGet packages

# Clean both debug and release
dotnet clean
dotnet clean --configuration Release


# build package for release
dotnet build --configuration Release

## TODO: Build project and set version to 1.2.3.4
# dotnet build -p:Version=1.2.3.4
15 changes: 7 additions & 8 deletions build/AvaloniaDependency.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0-preview4" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.0-preview4" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview4" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.0-preview4" />
<!--<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview4" />-->
<PackageReference Include="Avalonia.LinuxFramebuffer" Version="11.0.0-preview4" />
<PackageReference Include="Avalonia.Markup.Xaml.Loader" Version="11.0.0-preview4" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview4" />
<PackageReference Include="Avalonia" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.Markup.Xaml.Loader" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview5" />
<!--
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.0-preview5" />
-->
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion build/Base.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Version>8.1.97.3-preview.11.4</Version>
<Version>8.1.97.3-preview.11.5</Version>
<PackageProjectUrl>https://github.com/AvaloniaCommunity/Prism.Avalonia</PackageProjectUrl>
<Copyright>Copyright (c) 2023 Avalonia Community</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
2 changes: 1 addition & 1 deletion build/BuildTargets.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
</PropertyGroup>

</Project>
5 changes: 4 additions & 1 deletion build/EmbedXaml.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<Compile Update="**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<Compile Update="**\*.axaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<AvaloniaResource Include="**\*.xaml">
<SubType>Designer</SubType>
</AvaloniaResource>
Expand All @@ -16,4 +19,4 @@
</EmbeddedResource>-->
</ItemGroup>

</Project>
</Project>
17 changes: 6 additions & 11 deletions build/SampleApp.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@
<Import Project="AvaloniaDependency.props" />

<ItemGroup>
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview4" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.0-preview5" />
<!--<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview5" />-->
<PackageReference Include="Avalonia.LinuxFramebuffer" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview5" />
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\src\Prism.DryIoc.Avalonia\Prism.DryIoc.Avalonia.csproj" />
</ItemGroup>

<!--
<ItemGroup>
<PackageReference Include="Serilog.Sinks.Trace" Version="2.1.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Views\" />
</ItemGroup>
-->

</Project>
6 changes: 3 additions & 3 deletions samples/BootstrapperShellSample/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="BootstrapperShellSample.App">
<Application.Styles>
<StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/>
<StyleInclude Source="resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default"/>
<!--<StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/>
<StyleInclude Source="resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default"/>-->
</Application.Styles>
</Application>
</Application>
2 changes: 1 addition & 1 deletion samples/BootstrapperShellSample/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
}

protected override IAvaloniaObject CreateShell()
protected override AvaloniaObject CreateShell()
{
return Container.Resolve<MainWindow>();
}
Expand Down
Loading