diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index bb5ae25..9491a2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,116 +1,3 @@ - -# Created by https://www.gitignore.io/api/dotnetcore,visualstudio,visualstudiocode,openframeworks+visualstudio -# Edit at https://www.gitignore.io/?templates=dotnetcore,visualstudio,visualstudiocode,openframeworks+visualstudio - -### DotnetCore ### -# .NET Core build folders -/bin -/obj - -# Common node modules locations -/node_modules -/wwwroot/node_modules - - -### OpenFrameworks+VisualStudio ### -# ignore generated binaries -# but not the data folder - -/bin/* -!/bin/data/ - -# general - -[Bb]uild/ -[Oo]bj/ -*.o -[Dd]ebug*/ -[Rr]elease*/ -*.mode* -*.app/ -*.pyc -.svn/ -*.log - -# IDE files which should -# be ignored - -# XCode -*.pbxuser -*.perspective -*.perspectivev3 -*.mode1v3 -*.mode2v3 -# XCode 4 -xcuserdata -*.xcworkspace - -# Code::Blocks -*.depend -*.layout - -# Visual Studio -*.sdf -*.opensdf -*.suo -*.pdb -*.ilk -*.aps -ipch/ - -# Eclipse -.metadata -local.properties -.externalToolBuilders - -# operating system - -# Linux -*~ -# KDE -.directory -.AppleDouble - -# OSX -.DS_Store -*.swp -*~.nib -# Thumbnails -._* - -# Windows -# Image file caches -Thumbs.db -# Folder config file -Desktop.ini - -# Android -.csettings - -### OpenFrameworks+VisualStudio Patch ### -.vs/ -*.ncb -*.opendb -*.cachefile -*.VC.db -*.VC.VC.opendb -*.psess -*.vsp -*.vspx -*.sap - -### VisualStudioCode ### -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -### VisualStudioCode Patch ### -# Ignore all local history of files -.history - -### VisualStudio ### ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## @@ -118,6 +5,7 @@ Desktop.ini # User-specific files *.rsuser +*.suo *.user *.userosscache *.sln.docstates @@ -135,13 +23,18 @@ mono_crash.* [Rr]eleases/ x64/ x86/ +[Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ +[Oo]bj/ +[Oo]ut/ [Ll]og/ +[Ll]ogs/ # Visual Studio 2015/2017 cache/options directory +.vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ @@ -170,6 +63,9 @@ project.lock.json project.fragment.lock.json artifacts/ +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + # StyleCop StyleCopReport.xml @@ -177,10 +73,12 @@ StyleCopReport.xml *_i.c *_p.c *_h.h +*.ilk *.meta *.obj *.iobj *.pch +*.pdb *.ipdb *.pgc *.pgd @@ -192,6 +90,7 @@ StyleCopReport.xml *.tmp *.tmp_proj *_wpftmp.csproj +*.log *.vspscc *.vssscc .builds @@ -203,8 +102,21 @@ StyleCopReport.xml _Chutzpah* # Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb # Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap # Visual Studio Trace Files *.e2e @@ -220,9 +132,6 @@ _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user -# JustCode is a .NET coding add-in -.JustCode - # TeamCity is a build add-in _TeamCity* @@ -233,6 +142,11 @@ _TeamCity* .axoCover/* !.axoCover/settings.json +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + # Visual Studio code coverage results *.coverage *.coveragexml @@ -318,6 +232,7 @@ _pkginfo.txt # Others ClientBin/ ~$* +*~ *.dbmdl *.dbproj.schemaview *.jfm @@ -399,6 +314,7 @@ paket-files/ # Python Tools for Visual Studio (PTVS) __pycache__/ +*.pyc # Cake - Uncomment if you are using it # tools/** @@ -440,4 +356,8 @@ healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ -# End of https://www.gitignore.io/api/dotnetcore,visualstudio,visualstudiocode,openframeworks+visualstudio +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd \ No newline at end of file diff --git a/AvaloniaRibbon.sln b/AvaloniaRibbon.sln index e6cd28d..22dc86c 100644 --- a/AvaloniaRibbon.sln +++ b/AvaloniaRibbon.sln @@ -1,11 +1,13 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.902 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33424.131 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvaloniaUI.Ribbon.Sample", "AvaloniaUI.Ribbon.Sample\AvaloniaUI.Ribbon.Sample.csproj", "{E700E867-E7B5-4B53-A1FE-C6B4C36AD217}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvaloniaUI.Ribbon", "AvaloniaUI.Ribbon\AvaloniaUI.Ribbon.csproj", "{49D7DCC7-BD40-41D3-9F18-C653476E6AA2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvaloniaUI.Ribbon", "AvaloniaUI.Ribbon\AvaloniaUI.Ribbon.csproj", "{49D7DCC7-BD40-41D3-9F18-C653476E6AA2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvaloniaUI.Ribbon.SampleV2", "AvaloniaUI.Ribbon.SampleV2\AvaloniaUI.Ribbon.SampleV2.csproj", "{A3B32979-58D5-4DA3-B40F-DFDDABC8683A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -21,6 +23,10 @@ Global {49D7DCC7-BD40-41D3-9F18-C653476E6AA2}.Debug|Any CPU.Build.0 = Debug|Any CPU {49D7DCC7-BD40-41D3-9F18-C653476E6AA2}.Release|Any CPU.ActiveCfg = Release|Any CPU {49D7DCC7-BD40-41D3-9F18-C653476E6AA2}.Release|Any CPU.Build.0 = Release|Any CPU + {A3B32979-58D5-4DA3-B40F-DFDDABC8683A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3B32979-58D5-4DA3-B40F-DFDDABC8683A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3B32979-58D5-4DA3-B40F-DFDDABC8683A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3B32979-58D5-4DA3-B40F-DFDDABC8683A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/AvaloniaUI.Ribbon.Sample/App.xaml b/AvaloniaUI.Ribbon.Sample/App.xaml index 54f38c8..ec06041 100644 --- a/AvaloniaUI.Ribbon.Sample/App.xaml +++ b/AvaloniaUI.Ribbon.Sample/App.xaml @@ -2,7 +2,9 @@ x:Class="AvaloniaUI.Ribbon.Samples.App" xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="clr-namespace:AvaloniaUI.Ribbon.Samples"> + xmlns:local="clr-namespace:AvaloniaUI.Ribbon.Samples" + xmlns:sty="using:FluentAvalonia.Styling" + RequestedThemeVariant="Light"> @@ -10,16 +12,17 @@ - + - - + + + diff --git a/AvaloniaUI.Ribbon.Sample/AvaloniaUI.Ribbon.Sample.csproj b/AvaloniaUI.Ribbon.Sample/AvaloniaUI.Ribbon.Sample.csproj index b2e38ff..56d11ed 100644 --- a/AvaloniaUI.Ribbon.Sample/AvaloniaUI.Ribbon.Sample.csproj +++ b/AvaloniaUI.Ribbon.Sample/AvaloniaUI.Ribbon.Sample.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp3.1;net5.0 + net6.0 @@ -19,9 +19,10 @@ - - - + + + + diff --git a/AvaloniaUI.Ribbon.Sample/ViewLocator.cs b/AvaloniaUI.Ribbon.Sample/ViewLocator.cs index 34ab658..4aedff4 100644 --- a/AvaloniaUI.Ribbon.Sample/ViewLocator.cs +++ b/AvaloniaUI.Ribbon.Sample/ViewLocator.cs @@ -9,7 +9,7 @@ public class ViewLocator : IDataTemplate { public bool SupportsRecycling => false; - public IControl Build(object data) + public Control Build(object data) { var name = data.GetType().FullName.Replace("ViewModel", "View"); var type = Type.GetType(name); diff --git a/AvaloniaUI.Ribbon.Sample/Views/MainWindow.xaml b/AvaloniaUI.Ribbon.Sample/Views/MainWindow.xaml index 513ec4e..e13553c 100644 --- a/AvaloniaUI.Ribbon.Sample/Views/MainWindow.xaml +++ b/AvaloniaUI.Ribbon.Sample/Views/MainWindow.xaml @@ -350,13 +350,13 @@ - - + + - - - + + + @@ -842,7 +842,7 @@ - + diff --git a/AvaloniaUI.Ribbon.Sample/Views/MainWindow.xaml.cs b/AvaloniaUI.Ribbon.Sample/Views/MainWindow.xaml.cs index 2ca978f..d965ef1 100644 --- a/AvaloniaUI.Ribbon.Sample/Views/MainWindow.xaml.cs +++ b/AvaloniaUI.Ribbon.Sample/Views/MainWindow.xaml.cs @@ -38,32 +38,33 @@ public MainWindow() //this.Find