Skip to content

Commit 0685b75

Browse files
authored
Merge pull request #39 from AvaloniaCommunity/feature/Avalonia-11-Prev5
Upgrade to Avalonia v11.0 Preview 5
2 parents 14970c4 + 553bbab commit 0685b75

File tree

68 files changed

+583
-514
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+583
-514
lines changed

.gitignore

-134
Original file line numberDiff line numberDiff line change
@@ -117,47 +117,6 @@ _TeamCity*
117117
*.coverage
118118
*.coveragexml
119119

120-
# NCrunch
121-
_NCrunch_*
122-
.*crunch*.local.xml
123-
nCrunchTemp_*
124-
125-
# MightyMoose
126-
*.mm.*
127-
AutoTest.Net/
128-
129-
# Web workbench (sass)
130-
.sass-cache/
131-
132-
# Installshield output folder
133-
[Ee]xpress/
134-
135-
# DocProject is a documentation generator add-in
136-
DocProject/buildhelp/
137-
DocProject/Help/*.HxT
138-
DocProject/Help/*.HxC
139-
DocProject/Help/*.hhc
140-
DocProject/Help/*.hhk
141-
DocProject/Help/*.hhp
142-
DocProject/Help/Html2
143-
DocProject/Help/html
144-
145-
# Click-Once directory
146-
publish/
147-
148-
# Publish Web Output
149-
*.[Pp]ublish.xml
150-
*.azurePubxml
151-
# TODO: Comment the next line if you want to checkin your web deploy settings
152-
# but database connection strings (with potential passwords) will be unencrypted
153-
*.pubxml
154-
*.publishproj
155-
156-
# Microsoft Azure Web App publish settings. Comment the next line if you want to
157-
# checkin your Azure Web App publish settings, but sensitive information contained
158-
# in these scripts will be unencrypted
159-
PublishScripts/
160-
161120
# NuGet Packages
162121
*.nupkg
163122
# The packages folder can be ignored because of Package Restore
@@ -170,14 +129,6 @@ PublishScripts/
170129
*.nuget.props
171130
*.nuget.targets
172131

173-
# Microsoft Azure Build Output
174-
csx/
175-
*.build.csdef
176-
177-
# Microsoft Azure Emulator
178-
ecf/
179-
rcf/
180-
181132
# Windows Store app package directories and files
182133
AppPackages/
183134
BundleArtifacts/
@@ -190,24 +141,6 @@ _pkginfo.txt
190141
# but keep track of directories ending in .cache
191142
!*.[Cc]ache/
192143

193-
# Others
194-
ClientBin/
195-
~$*
196-
*~
197-
*.dbmdl
198-
*.dbproj.schemaview
199-
*.jfm
200-
*.pfx
201-
*.publishsettings
202-
orleans.codegen.cs
203-
204-
# Since there are multiple workflows, uncomment next line to ignore bower_components
205-
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
206-
#bower_components/
207-
208-
# RIA/Silverlight projects
209-
Generated_Code/
210-
211144
# Backup & report files from converting an old project file
212145
# to a newer Visual Studio version. Backup files are not needed,
213146
# because we have git ;-)
@@ -216,73 +149,6 @@ Backup*/
216149
UpgradeLog*.XML
217150
UpgradeLog*.htm
218151

219-
# SQL Server files
220-
*.mdf
221-
*.ldf
222-
*.ndf
223-
224-
# Business Intelligence projects
225-
*.rdl.data
226-
*.bim.layout
227-
*.bim_*.settings
228-
229-
# Microsoft Fakes
230-
FakesAssemblies/
231-
232-
# GhostDoc plugin setting file
233-
*.GhostDoc.xml
234-
235-
# Node.js Tools for Visual Studio
236-
.ntvs_analysis.dat
237-
node_modules/
238-
239-
# Typescript v1 declaration files
240-
typings/
241-
242-
# Visual Studio 6 build log
243-
*.plg
244-
245-
# Visual Studio 6 workspace options file
246-
*.opt
247-
248-
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
249-
*.vbw
250-
251-
# Visual Studio LightSwitch build output
252-
**/*.HTMLClient/GeneratedArtifacts
253-
**/*.DesktopClient/GeneratedArtifacts
254-
**/*.DesktopClient/ModelManifest.xml
255-
**/*.Server/GeneratedArtifacts
256-
**/*.Server/ModelManifest.xml
257-
_Pvt_Extensions
258-
259-
# Paket dependency manager
260-
.paket/paket.exe
261-
paket-files/
262-
263-
# FAKE - F# Make
264-
.fake/
265-
266152
# JetBrains Rider
267153
.idea/
268154
*.sln.iml
269-
270-
# CodeRush
271-
.cr/
272-
273-
# Python Tools for Visual Studio (PTVS)
274-
__pycache__/
275-
*.pyc
276-
277-
# Cake - Uncomment if you are using it
278-
# tools/**
279-
# !tools/packages.config
280-
281-
# Telerik's JustMock configuration file
282-
*.jmconfig
283-
284-
# BizTalk build output
285-
*.btp.cs
286-
*.btm.cs
287-
*.odx.cs
288-
*.xsd.cs

ChangeLog.md

+16
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
Change log history for Prism.Avalonia
44

5+
## v8.1.97.3-preview.11.5 (2022-02-??)
6+
7+
* Added support for Avalonia v11.0 Preview 5
8+
* IDialogWindow implements `WindowClosingEventArgs`. See, [Issue #9524](https://github.com/AvaloniaUI/Avalonia/issues/9524), [PR #9715](https://github.com/AvaloniaUI/Avalonia/pull/9715)
9+
* Avalonia interface objects deprecated - [PR #9553](https://github.com/AvaloniaUI/Avalonia/pull/9553)
10+
* Samples:
11+
* Upgraded sample projects to support latest Avalonia version
12+
* SampleDialogApp - Added MessageBox example
13+
* Theme imp
14+
15+
16+
## v8.1.97.3-preview.11.4 (2022-02-03)
17+
18+
* Added support for Avalonia v11.0 Preview 4
19+
* Upgraded sample projects to support latest Avalonia version
20+
521
## v8.1.97.1 - 2022-12-08
622

723
* NEW: Automatically performs `AutoWireViewModel`

Prism.Avalonia.sln

+2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
6262
ProjectSection(SolutionItems) = preProject
6363
.editorconfig = .editorconfig
6464
.gitignore = .gitignore
65+
ChangeLog.md = ChangeLog.md
6566
README.md = README.md
6667
Settings.XamlStyler = Settings.XamlStyler
68+
Upgrading-to-Avalonia-11.md = Upgrading-to-Avalonia-11.md
6769
EndProjectSection
6870
EndProject
6971
Global

README.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22

33
[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.
44

5-
| Package | NuGet |
6-
|-|-|
7-
| Prism.Avalonia | [![Prism.Avalonia NuGet Badge](https://buildstats.info/nuget/Prism.Avalonia?dWidth=70&includePreReleases=true)](https://www.nuget.org/packages/Prism.Avalonia/)
8-
| 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/)
5+
| Package | Stable | Preview
6+
|-|-|-|
7+
| 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/)
8+
| 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/)
9+
10+
911

1012
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!
1113

14+
## Changes
15+
16+
Be sure to check out the [ChangeLog.md] and [Upgrading-to-Avalonia-11.md] when upgrading your NuGet packages
17+
1218
## Install
1319

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

56-
protected override IAvaloniaObject CreateShell()
62+
protected override AvaloniaObject CreateShell()
5763
{
5864
if (IsSingleViewLifetime)
5965
return Container.Resolve<MainControl>(); // For Linux Framebuffer or DRM

Upgrading-to-Avalonia-11.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Upgrading to Avalonia v11 Preview
2+
3+
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.
4+
5+
Check out Avalonia's [Breaking Changes](https://github.com/AvaloniaUI/Avalonia/wiki/Breaking-Changes) wiki page for more information
6+
7+
## 11.0 Preview 5
8+
9+
* NEW: IDialogWindow now implements `WindowClosingEventArgs`.
10+
* See, [Issue #9524](https://github.com/AvaloniaUI/Avalonia/issues/9524), [PR #9715](https://github.com/AvaloniaUI/Avalonia/pull/9715)
11+
* This affects `IDialogWindow` implementation of `public event EventHandler<WindowClosingEventArgs>? Closing;`
12+
* Deprecation of redundant interfaces.
13+
* See, [PR #9553](https://github.com/AvaloniaUI/Avalonia/pull/9553)
14+
* I.E. `IAvaloniaObject` -> `AvalonObject`, and more.
15+
* Avalonia.ReactiveUI.Events.
16+
* See, [PR #5423](https://github.com/AvaloniaUI/Avalonia/pull/5423)
17+
* 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
18+
19+
### Known Issues
20+
21+
* [WindowNotificationManager Pop-Ups are no longer working in 11 Preview 5](https://github.com/AvaloniaUI/Avalonia/issues/10216)
22+
* Themes in sample are showing up cloudy
23+
* Selected ListView item still appears after clearing the List
24+
* **STATUS:** _Needs reported_
25+
* **Reproduce:**
26+
* Add items to ListView to fill 2+ pages
27+
* Scroll down to select item
28+
* Clear list
29+
* Resize window to show area previous now shown
30+
* **Result:**
31+
* Selected item still appears in list despite items removed from collection
32+
33+
### Themes
34+
35+
When using Fluent theme, you no longer has a `Mode` attribute.
36+
37+
```xml
38+
<!-- New -->
39+
<FluentTheme />
40+
41+
<!-- Old -->
42+
<FluentTheme Mode="Light" />
43+
```
44+
45+
46+
## 11.0 Preview 4
47+
48+
### DataTemplates
49+
50+
DataTemplates now require a `DataType` to be defined. This actually improves intellisense of your XAML and loading times with MVVM.
51+
52+
As a workaround for ListViews, you can use the `ItemTemplate` which does not require the definition of a `DataType`.
53+

build.ps1

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Build script for generating NuGet packages
2+
3+
# Clean both debug and release
4+
dotnet clean
5+
dotnet clean --configuration Release
6+
7+
8+
# build package for release
9+
dotnet build --configuration Release
10+
11+
## TODO: Build project and set version to 1.2.3.4
12+
# dotnet build -p:Version=1.2.3.4

build/AvaloniaDependency.props

+7-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
44

55
<ItemGroup>
6-
<PackageReference Include="Avalonia" Version="11.0.0-preview4" />
7-
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.0-preview4" />
8-
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview4" />
9-
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.0-preview4" />
10-
<!--<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview4" />-->
11-
<PackageReference Include="Avalonia.LinuxFramebuffer" Version="11.0.0-preview4" />
12-
<PackageReference Include="Avalonia.Markup.Xaml.Loader" Version="11.0.0-preview4" />
13-
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview4" />
6+
<PackageReference Include="Avalonia" Version="11.0.0-preview5" />
7+
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview5" />
8+
<PackageReference Include="Avalonia.Markup.Xaml.Loader" Version="11.0.0-preview5" />
9+
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview5" />
10+
<!--
11+
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.0-preview5" />
12+
-->
1413
</ItemGroup>
1514

1615
</Project>

build/Base.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project DefaultTargets="Build"
33
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
44
<PropertyGroup>
5-
<Version>8.1.97.3-preview.11.4</Version>
5+
<Version>8.1.97.3-preview.11.5</Version>
66
<PackageProjectUrl>https://github.com/AvaloniaCommunity/Prism.Avalonia</PackageProjectUrl>
77
<Copyright>Copyright (c) 2023 Avalonia Community</Copyright>
88
<PackageLicenseExpression>MIT</PackageLicenseExpression>

build/BuildTargets.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
44

55
<PropertyGroup>
6-
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
6+
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
77
</PropertyGroup>
88

99
</Project>

build/EmbedXaml.props

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
<Compile Update="**\*.xaml.cs">
88
<DependentUpon>%(Filename)</DependentUpon>
99
</Compile>
10+
<Compile Update="**\*.axaml.cs">
11+
<DependentUpon>%(Filename)</DependentUpon>
12+
</Compile>
1013
<AvaloniaResource Include="**\*.xaml">
1114
<SubType>Designer</SubType>
1215
</AvaloniaResource>
@@ -16,4 +19,4 @@
1619
</EmbeddedResource>-->
1720
</ItemGroup>
1821

19-
</Project>
22+
</Project>

build/SampleApp.props

+6-11
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@
66
<Import Project="AvaloniaDependency.props" />
77

88
<ItemGroup>
9-
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview4" />
9+
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.0-preview5" />
10+
<!--<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview5" />-->
11+
<PackageReference Include="Avalonia.LinuxFramebuffer" Version="11.0.0-preview5" />
12+
<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.0-preview5" />
13+
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview5" />
14+
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
1015
<ProjectReference Include="$(MSBuildThisFileDirectory)..\src\Prism.DryIoc.Avalonia\Prism.DryIoc.Avalonia.csproj" />
1116
</ItemGroup>
12-
13-
<!--
14-
<ItemGroup>
15-
<PackageReference Include="Serilog.Sinks.Trace" Version="2.1.0" />
16-
</ItemGroup>
17-
<ItemGroup>
18-
<Folder Include="Views\" />
19-
</ItemGroup>
20-
-->
21-
2217
</Project>

samples/BootstrapperShellSample/App.xaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
x:Class="BootstrapperShellSample.App">
44
<Application.Styles>
5-
<StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/>
6-
<StyleInclude Source="resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default"/>
5+
<!--<StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/>
6+
<StyleInclude Source="resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default"/>-->
77
</Application.Styles>
8-
</Application>
8+
</Application>

samples/BootstrapperShellSample/App.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected override void RegisterTypes(IContainerRegistry containerRegistry)
5151
{
5252
}
5353

54-
protected override IAvaloniaObject CreateShell()
54+
protected override AvaloniaObject CreateShell()
5555
{
5656
return Container.Resolve<MainWindow>();
5757
}

0 commit comments

Comments
 (0)