├── .gitignore
├── .vscode
├── launch.json
└── tasks.json
├── AvaloniaRibbon.sln
├── AvaloniaUI.Ribbon.Sample
├── App.xaml
├── App.xaml.cs
├── Assets
│ ├── avalonia-logo.ico
│ ├── boxIconLarge.png
│ ├── boxIconLarge.svg
│ ├── boxIconSmall.png
│ ├── boxIconSmall.svg
│ ├── slidersIconLarge.png
│ ├── slidersIconLarge.svg
│ ├── slidersIconOld.png
│ ├── slidersIconSmall.png
│ └── slidersIconSmall.svg
├── AvaloniaUI.Ribbon.Sample.csproj
├── Program.cs
├── ViewLocator.cs
├── ViewModels
│ ├── MainWindowViewModel.cs
│ └── ViewModelBase.cs
└── Views
│ ├── MainWindow.xaml
│ └── MainWindow.xaml.cs
├── AvaloniaUI.Ribbon
├── AvaloniaUI.Ribbon.csproj
├── BoundsPointToAdjustedPointConverter.cs
├── DoubleArithmeticConverter.cs
├── Gallery.cs
├── GalleryItem.cs
├── ICanAddToQuickAccess.cs
├── IKeyTipHandler.cs
├── IRibbonControl.cs
├── IsNullConverter.cs
├── KeyTip.cs
├── Locale
│ ├── en-ca.xaml
│ └── te-st.xaml
├── Properties
│ └── AssemblyInfo.cs
├── QuickAccessToolbar.cs
├── Ribbon.cs
├── RibbonButton.cs
├── RibbonContextualTabGroup.cs
├── RibbonControlHelper.cs
├── RibbonDropDownButton.cs
├── RibbonDropDownItem.cs
├── RibbonDropDownItemPresenter.cs
├── RibbonGroupBox.cs
├── RibbonGroupWrapPanel.cs
├── RibbonGroupsStackPanel.cs
├── RibbonMenu.cs
├── RibbonMenuBase.cs
├── RibbonMenuItem.cs
├── RibbonSplitButton.cs
├── RibbonTab.cs
├── RibbonToggleButton.cs
├── RibbonWindow.cs
└── Styles
│ ├── Default
│ ├── AvaloniaRibbon.xaml
│ ├── Controls
│ │ ├── Gallery.xaml
│ │ ├── KeyTip.xaml
│ │ ├── QuickAccessToolbar.xaml
│ │ ├── Ribbon.xaml
│ │ ├── RibbonButton.xaml
│ │ ├── RibbonContextualTabGroup.xaml
│ │ ├── RibbonDropDownButton.xaml
│ │ ├── RibbonGroupBox.xaml
│ │ ├── RibbonMenu.xaml
│ │ ├── RibbonSplitButton.xaml
│ │ ├── RibbonTab.xaml
│ │ ├── RibbonThemeColor.xaml
│ │ ├── RibbonToggleButton.xaml
│ │ └── RibbonWindow.xaml
│ └── Res.xaml
│ └── Fluent
│ ├── AvaloniaRibbon.xaml
│ ├── Controls
│ ├── Gallery.xaml
│ ├── KeyTip.xaml
│ ├── QuickAccessToolbar.xaml
│ ├── Ribbon.xaml
│ ├── RibbonButton.xaml
│ ├── RibbonContextualTabGroup.xaml
│ ├── RibbonDropDownButton.xaml
│ ├── RibbonDropDownButtonItemPresenter.xaml
│ ├── RibbonGroupBox.xaml
│ ├── RibbonMenu.xaml
│ ├── RibbonSplitButton.xaml
│ ├── RibbonTab.xaml
│ ├── RibbonToggleButton.xaml
│ └── RibbonWindow.xaml
│ └── Res.xaml
├── LICENSE
├── README.md
└── ReadmeImages
├── Ribbon-FluentDark-Horizontal.png
├── Ribbon-FluentDark-Vertical.png
├── Ribbon-FluentLight-Horizontal.png
└── Ribbon-FluentLight-Vertical.png
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/dotnetcore,visualstudio,visualstudiocode,openframeworks+visualstudio
3 | # Edit at https://www.gitignore.io/?templates=dotnetcore,visualstudio,visualstudiocode,openframeworks+visualstudio
4 |
5 | ### DotnetCore ###
6 | # .NET Core build folders
7 | /bin
8 | /obj
9 |
10 | # Common node modules locations
11 | /node_modules
12 | /wwwroot/node_modules
13 |
14 |
15 | ### OpenFrameworks+VisualStudio ###
16 | # ignore generated binaries
17 | # but not the data folder
18 |
19 | /bin/*
20 | !/bin/data/
21 |
22 | # general
23 |
24 | [Bb]uild/
25 | [Oo]bj/
26 | *.o
27 | [Dd]ebug*/
28 | [Rr]elease*/
29 | *.mode*
30 | *.app/
31 | *.pyc
32 | .svn/
33 | *.log
34 |
35 | # IDE files which should
36 | # be ignored
37 |
38 | # XCode
39 | *.pbxuser
40 | *.perspective
41 | *.perspectivev3
42 | *.mode1v3
43 | *.mode2v3
44 | # XCode 4
45 | xcuserdata
46 | *.xcworkspace
47 |
48 | # Code::Blocks
49 | *.depend
50 | *.layout
51 |
52 | # Visual Studio
53 | *.sdf
54 | *.opensdf
55 | *.suo
56 | *.pdb
57 | *.ilk
58 | *.aps
59 | ipch/
60 |
61 | # Eclipse
62 | .metadata
63 | local.properties
64 | .externalToolBuilders
65 |
66 | # operating system
67 |
68 | # Linux
69 | *~
70 | # KDE
71 | .directory
72 | .AppleDouble
73 |
74 | # OSX
75 | .DS_Store
76 | *.swp
77 | *~.nib
78 | # Thumbnails
79 | ._*
80 |
81 | # Windows
82 | # Image file caches
83 | Thumbs.db
84 | # Folder config file
85 | Desktop.ini
86 |
87 | # Android
88 | .csettings
89 |
90 | ### OpenFrameworks+VisualStudio Patch ###
91 | .vs/
92 | *.ncb
93 | *.opendb
94 | *.cachefile
95 | *.VC.db
96 | *.VC.VC.opendb
97 | *.psess
98 | *.vsp
99 | *.vspx
100 | *.sap
101 |
102 | ### VisualStudioCode ###
103 | .vscode/*
104 | !.vscode/settings.json
105 | !.vscode/tasks.json
106 | !.vscode/launch.json
107 | !.vscode/extensions.json
108 |
109 | ### VisualStudioCode Patch ###
110 | # Ignore all local history of files
111 | .history
112 |
113 | ### VisualStudio ###
114 | ## Ignore Visual Studio temporary files, build results, and
115 | ## files generated by popular Visual Studio add-ons.
116 | ##
117 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
118 |
119 | # User-specific files
120 | *.rsuser
121 | *.user
122 | *.userosscache
123 | *.sln.docstates
124 |
125 | # User-specific files (MonoDevelop/Xamarin Studio)
126 | *.userprefs
127 |
128 | # Mono auto generated files
129 | mono_crash.*
130 |
131 | # Build results
132 | [Dd]ebug/
133 | [Dd]ebugPublic/
134 | [Rr]elease/
135 | [Rr]eleases/
136 | x64/
137 | x86/
138 | [Aa][Rr][Mm]/
139 | [Aa][Rr][Mm]64/
140 | bld/
141 | [Bb]in/
142 | [Ll]og/
143 |
144 | # Visual Studio 2015/2017 cache/options directory
145 | # Uncomment if you have tasks that create the project's static files in wwwroot
146 | #wwwroot/
147 |
148 | # Visual Studio 2017 auto generated files
149 | Generated\ Files/
150 |
151 | # MSTest test Results
152 | [Tt]est[Rr]esult*/
153 | [Bb]uild[Ll]og.*
154 |
155 | # NUnit
156 | *.VisualState.xml
157 | TestResult.xml
158 | nunit-*.xml
159 |
160 | # Build Results of an ATL Project
161 | [Dd]ebugPS/
162 | [Rr]eleasePS/
163 | dlldata.c
164 |
165 | # Benchmark Results
166 | BenchmarkDotNet.Artifacts/
167 |
168 | # .NET Core
169 | project.lock.json
170 | project.fragment.lock.json
171 | artifacts/
172 |
173 | # StyleCop
174 | StyleCopReport.xml
175 |
176 | # Files built by Visual Studio
177 | *_i.c
178 | *_p.c
179 | *_h.h
180 | *.meta
181 | *.obj
182 | *.iobj
183 | *.pch
184 | *.ipdb
185 | *.pgc
186 | *.pgd
187 | *.rsp
188 | *.sbr
189 | *.tlb
190 | *.tli
191 | *.tlh
192 | *.tmp
193 | *.tmp_proj
194 | *_wpftmp.csproj
195 | *.vspscc
196 | *.vssscc
197 | .builds
198 | *.pidb
199 | *.svclog
200 | *.scc
201 |
202 | # Chutzpah Test files
203 | _Chutzpah*
204 |
205 | # Visual C++ cache files
206 |
207 | # Visual Studio profiler
208 |
209 | # Visual Studio Trace Files
210 | *.e2e
211 |
212 | # TFS 2012 Local Workspace
213 | $tf/
214 |
215 | # Guidance Automation Toolkit
216 | *.gpState
217 |
218 | # ReSharper is a .NET coding add-in
219 | _ReSharper*/
220 | *.[Rr]e[Ss]harper
221 | *.DotSettings.user
222 |
223 | # JustCode is a .NET coding add-in
224 | .JustCode
225 |
226 | # TeamCity is a build add-in
227 | _TeamCity*
228 |
229 | # DotCover is a Code Coverage Tool
230 | *.dotCover
231 |
232 | # AxoCover is a Code Coverage Tool
233 | .axoCover/*
234 | !.axoCover/settings.json
235 |
236 | # Visual Studio code coverage results
237 | *.coverage
238 | *.coveragexml
239 |
240 | # NCrunch
241 | _NCrunch_*
242 | .*crunch*.local.xml
243 | nCrunchTemp_*
244 |
245 | # MightyMoose
246 | *.mm.*
247 | AutoTest.Net/
248 |
249 | # Web workbench (sass)
250 | .sass-cache/
251 |
252 | # Installshield output folder
253 | [Ee]xpress/
254 |
255 | # DocProject is a documentation generator add-in
256 | DocProject/buildhelp/
257 | DocProject/Help/*.HxT
258 | DocProject/Help/*.HxC
259 | DocProject/Help/*.hhc
260 | DocProject/Help/*.hhk
261 | DocProject/Help/*.hhp
262 | DocProject/Help/Html2
263 | DocProject/Help/html
264 |
265 | # Click-Once directory
266 | publish/
267 |
268 | # Publish Web Output
269 | *.[Pp]ublish.xml
270 | *.azurePubxml
271 | # Note: Comment the next line if you want to checkin your web deploy settings,
272 | # but database connection strings (with potential passwords) will be unencrypted
273 | *.pubxml
274 | *.publishproj
275 |
276 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
277 | # checkin your Azure Web App publish settings, but sensitive information contained
278 | # in these scripts will be unencrypted
279 | PublishScripts/
280 |
281 | # NuGet Packages
282 | *.nupkg
283 | # NuGet Symbol Packages
284 | *.snupkg
285 | # The packages folder can be ignored because of Package Restore
286 | **/[Pp]ackages/*
287 | # except build/, which is used as an MSBuild target.
288 | !**/[Pp]ackages/build/
289 | # Uncomment if necessary however generally it will be regenerated when needed
290 | #!**/[Pp]ackages/repositories.config
291 | # NuGet v3's project.json files produces more ignorable files
292 | *.nuget.props
293 | *.nuget.targets
294 |
295 | # Microsoft Azure Build Output
296 | csx/
297 | *.build.csdef
298 |
299 | # Microsoft Azure Emulator
300 | ecf/
301 | rcf/
302 |
303 | # Windows Store app package directories and files
304 | AppPackages/
305 | BundleArtifacts/
306 | Package.StoreAssociation.xml
307 | _pkginfo.txt
308 | *.appx
309 | *.appxbundle
310 | *.appxupload
311 |
312 | # Visual Studio cache files
313 | # files ending in .cache can be ignored
314 | *.[Cc]ache
315 | # but keep track of directories ending in .cache
316 | !?*.[Cc]ache/
317 |
318 | # Others
319 | ClientBin/
320 | ~$*
321 | *.dbmdl
322 | *.dbproj.schemaview
323 | *.jfm
324 | *.pfx
325 | *.publishsettings
326 | orleans.codegen.cs
327 |
328 | # Including strong name files can present a security risk
329 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
330 | #*.snk
331 |
332 | # Since there are multiple workflows, uncomment next line to ignore bower_components
333 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
334 | #bower_components/
335 |
336 | # RIA/Silverlight projects
337 | Generated_Code/
338 |
339 | # Backup & report files from converting an old project file
340 | # to a newer Visual Studio version. Backup files are not needed,
341 | # because we have git ;-)
342 | _UpgradeReport_Files/
343 | Backup*/
344 | UpgradeLog*.XML
345 | UpgradeLog*.htm
346 | ServiceFabricBackup/
347 | *.rptproj.bak
348 |
349 | # SQL Server files
350 | *.mdf
351 | *.ldf
352 | *.ndf
353 |
354 | # Business Intelligence projects
355 | *.rdl.data
356 | *.bim.layout
357 | *.bim_*.settings
358 | *.rptproj.rsuser
359 | *- [Bb]ackup.rdl
360 | *- [Bb]ackup ([0-9]).rdl
361 | *- [Bb]ackup ([0-9][0-9]).rdl
362 |
363 | # Microsoft Fakes
364 | FakesAssemblies/
365 |
366 | # GhostDoc plugin setting file
367 | *.GhostDoc.xml
368 |
369 | # Node.js Tools for Visual Studio
370 | .ntvs_analysis.dat
371 | node_modules/
372 |
373 | # Visual Studio 6 build log
374 | *.plg
375 |
376 | # Visual Studio 6 workspace options file
377 | *.opt
378 |
379 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
380 | *.vbw
381 |
382 | # Visual Studio LightSwitch build output
383 | **/*.HTMLClient/GeneratedArtifacts
384 | **/*.DesktopClient/GeneratedArtifacts
385 | **/*.DesktopClient/ModelManifest.xml
386 | **/*.Server/GeneratedArtifacts
387 | **/*.Server/ModelManifest.xml
388 | _Pvt_Extensions
389 |
390 | # Paket dependency manager
391 | .paket/paket.exe
392 | paket-files/
393 |
394 | # FAKE - F# Make
395 | .fake/
396 |
397 | # CodeRush personal settings
398 | .cr/personal
399 |
400 | # Python Tools for Visual Studio (PTVS)
401 | __pycache__/
402 |
403 | # Cake - Uncomment if you are using it
404 | # tools/**
405 | # !tools/packages.config
406 |
407 | # Tabs Studio
408 | *.tss
409 |
410 | # Telerik's JustMock configuration file
411 | *.jmconfig
412 |
413 | # BizTalk build output
414 | *.btp.cs
415 | *.btm.cs
416 | *.odx.cs
417 | *.xsd.cs
418 |
419 | # OpenCover UI analysis results
420 | OpenCover/
421 |
422 | # Azure Stream Analytics local run output
423 | ASALocalRun/
424 |
425 | # MSBuild Binary and Structured Log
426 | *.binlog
427 |
428 | # NVidia Nsight GPU debugger configuration file
429 | *.nvuser
430 |
431 | # MFractors (Xamarin productivity tool) working folder
432 | .mfractor/
433 |
434 | # Local History for Visual Studio
435 | .localhistory/
436 |
437 | # BeatPulse healthcheck temp database
438 | healthchecksdb
439 |
440 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
441 | MigrationBackup/
442 |
443 | # End of https://www.gitignore.io/api/dotnetcore,visualstudio,visualstudiocode,openframeworks+visualstudio
444 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": ".NET Core Launch (console)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | "program": "${workspaceFolder}/AvaloniaUI.Ribbon.Sample/bin/Debug/netcoreapp3.1/AvaloniaUI.Ribbon.Sample.dll",
13 | "args": [],
14 | "cwd": "${workspaceFolder}/AvaloniaUI.Ribbon.Sample",
15 | "console": "internalConsole",
16 | "stopAtEntry": false
17 | },
18 | {
19 | "name": ".NET Core Attach",
20 | "type": "coreclr",
21 | "request": "attach",
22 | "processId": "${command:pickProcess}"
23 | }
24 | ]
25 | }
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "build",
6 | "command": "dotnet",
7 | "type": "process",
8 | "args": [
9 | "build",
10 | "${workspaceFolder}/AvaloniaUI.Ribbon.Sample/AvaloniaUI.Ribbon.Sample.csproj",
11 | "/property:GenerateFullPaths=true",
12 | "/consoleloggerparameters:NoSummary"
13 | ],
14 | "problemMatcher": "$msCompile"
15 | },
16 | {
17 | "label": "publish",
18 | "command": "dotnet",
19 | "type": "process",
20 | "args": [
21 | "publish",
22 | "${workspaceFolder}/AvaloniaUI.Ribbon.Sample/AvaloniaUI.Ribbon.Sample.csproj",
23 | "/property:GenerateFullPaths=true",
24 | "/consoleloggerparameters:NoSummary"
25 | ],
26 | "problemMatcher": "$msCompile"
27 | },
28 | {
29 | "label": "watch",
30 | "command": "dotnet",
31 | "type": "process",
32 | "args": [
33 | "watch",
34 | "run",
35 | "${workspaceFolder}/AvaloniaUI.Ribbon.Sample/AvaloniaUI.Ribbon.Sample.csproj",
36 | "/property:GenerateFullPaths=true",
37 | "/consoleloggerparameters:NoSummary"
38 | ],
39 | "problemMatcher": "$msCompile"
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/AvaloniaRibbon.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.902
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AvaloniaUI.Ribbon.Sample", "AvaloniaUI.Ribbon.Sample\AvaloniaUI.Ribbon.Sample.csproj", "{E700E867-E7B5-4B53-A1FE-C6B4C36AD217}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvaloniaUI.Ribbon", "AvaloniaUI.Ribbon\AvaloniaUI.Ribbon.csproj", "{49D7DCC7-BD40-41D3-9F18-C653476E6AA2}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {E700E867-E7B5-4B53-A1FE-C6B4C36AD217}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {E700E867-E7B5-4B53-A1FE-C6B4C36AD217}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {E700E867-E7B5-4B53-A1FE-C6B4C36AD217}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {E700E867-E7B5-4B53-A1FE-C6B4C36AD217}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {49D7DCC7-BD40-41D3-9F18-C653476E6AA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {49D7DCC7-BD40-41D3-9F18-C653476E6AA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {49D7DCC7-BD40-41D3-9F18-C653476E6AA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {49D7DCC7-BD40-41D3-9F18-C653476E6AA2}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {F0928176-2D27-4D65-A1AD-C5CDDC9C98E3}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Avalonia;
2 | using Avalonia.Controls;
3 | using Avalonia.Controls.ApplicationLifetimes;
4 | using Avalonia.Markup.Xaml;
5 | using AvaloniaUI.Ribbon.Samples.Views;
6 |
7 | namespace AvaloniaUI.Ribbon.Samples
8 | {
9 | public class App : Application
10 | {
11 | internal static IClassicDesktopStyleApplicationLifetime Lifetime => Current.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime;
12 |
13 | public override void Initialize()
14 | {
15 | AvaloniaXamlLoader.Load(this);
16 | }
17 |
18 | public override void OnFrameworkInitializationCompleted()
19 | {
20 | if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime)
21 | {
22 | Lifetime.MainWindow = new MainWindow();
23 | }
24 |
25 | base.OnFrameworkInitializationCompleted();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Assets/avalonia-logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Splitwirez/AvaloniaRibbon/23df92b21b30947983721151c40022649eac228f/AvaloniaUI.Ribbon.Sample/Assets/avalonia-logo.ico
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Assets/boxIconLarge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Splitwirez/AvaloniaRibbon/23df92b21b30947983721151c40022649eac228f/AvaloniaUI.Ribbon.Sample/Assets/boxIconLarge.png
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Assets/boxIconLarge.svg:
--------------------------------------------------------------------------------
1 |
2 |
77 |
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Assets/boxIconSmall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Splitwirez/AvaloniaRibbon/23df92b21b30947983721151c40022649eac228f/AvaloniaUI.Ribbon.Sample/Assets/boxIconSmall.png
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Assets/boxIconSmall.svg:
--------------------------------------------------------------------------------
1 |
2 |
77 |
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Assets/slidersIconLarge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Splitwirez/AvaloniaRibbon/23df92b21b30947983721151c40022649eac228f/AvaloniaUI.Ribbon.Sample/Assets/slidersIconLarge.png
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Assets/slidersIconLarge.svg:
--------------------------------------------------------------------------------
1 |
2 |
115 |
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Assets/slidersIconOld.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Splitwirez/AvaloniaRibbon/23df92b21b30947983721151c40022649eac228f/AvaloniaUI.Ribbon.Sample/Assets/slidersIconOld.png
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Assets/slidersIconSmall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Splitwirez/AvaloniaRibbon/23df92b21b30947983721151c40022649eac228f/AvaloniaUI.Ribbon.Sample/Assets/slidersIconSmall.png
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Assets/slidersIconSmall.svg:
--------------------------------------------------------------------------------
1 |
2 |
115 |
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/AvaloniaUI.Ribbon.Sample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Exe
4 | netcoreapp3.1;net5.0
5 |
6 |
7 |
8 | %(Filename)
9 |
10 |
11 | Designer
12 |
13 |
14 | %(Filename)
15 |
16 |
17 | Designer
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Program.cs:
--------------------------------------------------------------------------------
1 | using Avalonia;
2 | using Avalonia.Logging;
3 | using Avalonia.Platform;
4 |
5 | namespace AvaloniaUI.Ribbon.Samples
6 | {
7 | class Program
8 | {
9 | static AppBuilder BuildAvaloniaApp()
10 | {
11 | return AppBuilder.Configure()
12 | .UsePlatformDetect();
13 | }
14 |
15 | // The entry point. Things aren't ready yet, so at this point
16 | // you shouldn't use any Avalonia types or anything that expects
17 | // a SynchronizationContext to be ready
18 | static void Main(string[] args)
19 | {
20 | BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/ViewLocator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Avalonia.Controls;
3 | using Avalonia.Controls.Templates;
4 | using AvaloniaUI.Ribbon.Samples.ViewModels;
5 |
6 | namespace AvaloniaUI.Ribbon.Samples
7 | {
8 | public class ViewLocator : IDataTemplate
9 | {
10 | public bool SupportsRecycling => false;
11 |
12 | public IControl Build(object data)
13 | {
14 | var name = data.GetType().FullName.Replace("ViewModel", "View");
15 | var type = Type.GetType(name);
16 |
17 | if (type != null)
18 | {
19 | return (Control)Activator.CreateInstance(type);
20 | }
21 | else
22 | {
23 | return new TextBlock { Text = "Not Found: " + name };
24 | }
25 | }
26 |
27 | public bool Match(object data)
28 | {
29 | return data is ViewModelBase;
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/ViewModels/MainWindowViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.IO;
4 | using System.Text;
5 | using System.Windows.Input;
6 | using System.Runtime.CompilerServices;
7 | using ReactiveUI;
8 |
9 | namespace AvaloniaUI.Ribbon.Samples.ViewModels
10 | {
11 | public class MainWindowViewModel : INotifyPropertyChanged
12 | {
13 | public void OnClickCommand(object parameter)
14 | {
15 | string paramString = "[NO CONTENT]";
16 |
17 | if (parameter != null)
18 | {
19 | if (parameter is string str)
20 | paramString = str;
21 | else
22 | paramString = parameter.ToString();
23 | }
24 |
25 | Console.WriteLine("OnClickCommand invoked: " + paramString);
26 | LastActionText = paramString;
27 | }
28 |
29 | string _lastActionText = "none";
30 |
31 | public string LastActionText
32 | {
33 | get => _lastActionText;
34 | set
35 | {
36 | _lastActionText = value;
37 | NotifyPropertyChanged();
38 | }
39 | }
40 |
41 | bool _showContextualGroup1 = true;
42 |
43 | public bool ShowContextualGroup1
44 | {
45 | get => _showContextualGroup1;
46 | set
47 | {
48 | _showContextualGroup1 = value;
49 | NotifyPropertyChanged();
50 | }
51 | }
52 |
53 | bool _showContextualGroup2 = false;
54 |
55 | public bool ShowContextualGroup2
56 | {
57 | get => _showContextualGroup2;
58 | set
59 | {
60 | _showContextualGroup2 = value;
61 | NotifyPropertyChanged();
62 | }
63 | }
64 |
65 | bool _showContextualGroup3 = false;
66 |
67 | public bool ShowContextualGroup3
68 | {
69 | get => _showContextualGroup3;
70 | set
71 | {
72 | _showContextualGroup3 = value;
73 | NotifyPropertyChanged();
74 | }
75 | }
76 |
77 |
78 | public event PropertyChangedEventHandler PropertyChanged;
79 |
80 | public void NotifyPropertyChanged([CallerMemberName]string propertyName = "")
81 | {
82 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
83 | }
84 |
85 | string _help = "Help requested!";
86 | public void HelpCommand(object parameter)
87 | {
88 | Console.WriteLine(_help);
89 | LastActionText = _help;
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/ViewModels/ViewModelBase.cs:
--------------------------------------------------------------------------------
1 | using ReactiveUI;
2 |
3 | namespace AvaloniaUI.Ribbon.Samples.ViewModels
4 | {
5 | public class ViewModelBase : ReactiveObject
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/AvaloniaUI.Ribbon.Sample/Views/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using Avalonia;
2 | using Avalonia.Controls;
3 | using AvaloniaUI.Ribbon;
4 | using Avalonia.Layout;
5 | using Avalonia.Markup.Xaml;
6 | using Avalonia.Markup.Xaml.MarkupExtensions;
7 | using Avalonia.Markup.Xaml.Styling;
8 | using System;
9 | using Avalonia.Media;
10 | using Avalonia.Themes.Fluent;
11 |
12 | namespace AvaloniaUI.Ribbon.Samples.Views
13 | {
14 | public class MainWindow : RibbonWindow
15 | {
16 | public MainWindow()
17 | {
18 | InitializeComponent();
19 | //Ribbon ribbon = this.Find("RibbonControl");
20 | Button verticalRibbonButton = this.Find