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 2 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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
22 changes: 22 additions & 0 deletions Upgrading-to-Avalonia-11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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: Window now implements `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

## 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`.

16 changes: 8 additions & 8 deletions build/AvaloniaDependency.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
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.Controls.DataGrid" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview5" />
<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.Markup.Xaml.Loader" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.ReactiveUI" 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
3 changes: 2 additions & 1 deletion build/SampleApp.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<Import Project="AvaloniaDependency.props" />

<ItemGroup>
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview4" />
<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview5" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\src\Prism.DryIoc.Avalonia\Prism.DryIoc.Avalonia.csproj" />
</ItemGroup>

Expand Down
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
6 changes: 3 additions & 3 deletions samples/ModulesSample/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="ModulesSample.App">
<Application.Styles>
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
<!--<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>-->
<!--<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>-->
</Application.Styles>
</Application>
</Application>
2 changes: 1 addition & 1 deletion samples/ModulesSample/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected override void RegisterTypes(IContainerRegistry containerRegistry)
containerRegistry.RegisterSingleton<IModuleTracker, ModuleTracker>();
}

protected override IAvaloniaObject CreateShell()
protected override AvaloniaObject CreateShell()
{
return Container.Resolve<MainWindow>();
}
Expand Down
7 changes: 4 additions & 3 deletions samples/SampleDialogApp/App.axaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SampleDialogApp.App">
<Application.Styles>
<FluentTheme Mode="Light"/>
</Application.Styles>
<Application.Styles>
<FluentTheme />
<!--<FluentTheme Mode="Light" />-->
</Application.Styles>
</Application>
2 changes: 1 addition & 1 deletion samples/SampleDialogApp/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public override void Initialize()
base.Initialize();
}

protected override IAvaloniaObject CreateShell()
protected override AvaloniaObject CreateShell()
{
Console.WriteLine("CreateShell()");
return Container.Resolve<MainWindow>();
Expand Down
8 changes: 4 additions & 4 deletions samples/SampleDialogApp/Views/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public MainWindow()
}

// When referencing Avalonia package, XamlNameReferenceGenerator
////private void InitializeComponent()
////{
//// AvaloniaXamlLoader.Load(this);
////}
private void InitializeComponent()
DamianSuess marked this conversation as resolved.
Show resolved Hide resolved
{
AvaloniaXamlLoader.Load(this);
}
}
}
8 changes: 4 additions & 4 deletions samples/SampleDialogApp/Views/NotificationDialogView.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public NotificationDialogView()
InitializeComponent();
}

///private void InitializeComponent()
///{
/// AvaloniaXamlLoader.Load(this);
///}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
}
3 changes: 2 additions & 1 deletion samples/SampleMvvmApp/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SampleMvvmApp.App">
<Application.Styles>
<FluentTheme Mode="Light" />
<FluentTheme />
<!--<FluentTheme Mode="Light" />-->
DamianSuess marked this conversation as resolved.
Show resolved Hide resolved

<!-- Custom SVG glyphs -->
<StyleInclude Source="avares://SampleMvvmApp/Styles/Icons.axaml" />
Expand Down
2 changes: 1 addition & 1 deletion samples/SampleMvvmApp/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)

/// <summary>User interface entry point, called after Register and ConfigureModules.</summary>
/// <returns>Startup View.</returns>
protected override IAvaloniaObject CreateShell()
protected override AvaloniaObject CreateShell()
{
Console.WriteLine("CreateShell()");
return Container.Resolve<MainWindow>();
Expand Down
3 changes: 3 additions & 0 deletions samples/SampleMvvmApp/SampleMvvmApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<Import Project="../../build/SampleApp.props" />

<ItemGroup>
<!--<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview5" />-->

<Compile Update="Views\DashboardView.xaml.cs">
<DependentUpon>DashboardView.xaml</DependentUpon>
</Compile>
Expand Down
3 changes: 2 additions & 1 deletion samples/ViewDiscovery/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="ViewDiscovery.App">
<Application.Styles>
<FluentTheme Mode="Light" />
<!--<FluentTheme Mode="Light" />-->
<SimpleTheme />
</Application.Styles>
</Application>
2 changes: 1 addition & 1 deletion samples/ViewDiscovery/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected override void RegisterTypes(IContainerRegistry containerRegistry)

/// <summary>User interface entry point, called after Register and ConfigureModules.</summary>
/// <returns>Startup View.</returns>
protected override IAvaloniaObject CreateShell()
protected override AvaloniaObject CreateShell()
{
System.Diagnostics.Debug.WriteLine("CreateShell()");
return Container.Resolve<MainWindow>();
Expand Down
6 changes: 3 additions & 3 deletions samples/ViewDiscovery/ViewDiscovery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<Import Project="../../build/SampleApp.props" />

<!--<ItemGroup>
<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.0-preview4" />
</ItemGroup>-->
<ItemGroup>
<PackageReference Include="Avalonia.Themes.Simple" Version="11.0.0-preview5" />
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion samples/ViewDiscovery/Views/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ private async void Test()

if (!_regionManager.Regions.ContainsRegionWithName(RegionNames.ContentRegion))
{
// ISSUE: Avalonia v11-prev4 can't find the region - With v0.10.x this does not happen.
// ISSUE: Avalonia v11-prev4 can't find the region
// With v0.10.x this does not happen.
System.Diagnostics.Debugger.Break();
return;
}
Expand Down
Loading