{"id":17943894,"url":"https://github.com/bandysc/classic.avalonia","last_synced_at":"2025-05-15T15:04:41.443Z","repository":{"id":257943552,"uuid":"873182552","full_name":"BAndysc/Classic.Avalonia","owner":"BAndysc","description":"Classic Theme and Controls for Avalonia","archived":false,"fork":false,"pushed_at":"2025-05-07T21:22:03.000Z","size":1802,"stargazers_count":262,"open_issues_count":6,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T21:39:39.349Z","etag":null,"topics":["avalonia"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BAndysc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-15T18:26:03.000Z","updated_at":"2025-05-07T21:19:58.000Z","dependencies_parsed_at":"2024-10-23T06:29:48.517Z","dependency_job_id":"6043149c-28ae-468e-9332-91b1f03c4fa3","html_url":"https://github.com/BAndysc/Classic.Avalonia","commit_stats":null,"previous_names":["bandysc/classic.avalonia"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BAndysc%2FClassic.Avalonia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BAndysc%2FClassic.Avalonia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BAndysc%2FClassic.Avalonia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BAndysc%2FClassic.Avalonia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BAndysc","download_url":"https://codeload.github.com/BAndysc/Classic.Avalonia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avalonia"],"created_at":"2024-10-29T05:03:33.295Z","updated_at":"2025-05-15T15:04:41.424Z","avatar_url":"https://github.com/BAndysc.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![icon](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/icon.png) Classic.Avalonia\n\n### 📢 If you have used Classic.Avalonia, share your app [here](https://github.com/BAndysc/Classic.Avalonia/discussions/2)!\n\n## Overview\n\nThis project brings the classic Windows 9x theme to Avalonia. It is inspired by the [WPF Classic Theme](https://github.com/dotnet/wpf/tree/main/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Classic/Themes), with enhancements and additional controls for a more authentic look and feel. Check out the screenshots below for a preview!\n\n## Installation\n\n1. Install the `Classic.Avalonia.Theme` package via NuGet:\n   ```\n   Install-Package Classic.Avalonia.Theme\n   ```\n2. In your `App.axaml`, replace the existing theme (e.g., `\u003cFluentTheme /\u003e` or `\u003cSimpleTheme /\u003e`) with the Classic theme:\n   ```xml\n   \u003cApplication ...\u003e\n       \u003cApplication.Styles\u003e\n           \u003cClassicTheme /\u003e\n       \u003c/Application.Styles\u003e\n   \u003c/Application\u003e\n   ```\n\n### DataGrid\nTo use the DataGrid, install the `Classic.Avalonia.Theme.DataGrid` package and include the style in `App.axaml`:\n```xml\n\u003cStyleInclude Source=\"avares://Classic.Avalonia.Theme.DataGrid/Classic.axaml\"/\u003e\n```\n\n### ColorPicker\nFor the ColorPicker, install the `Classic.Avalonia.Theme.ColorPicker` package and include the style in `App.axaml`:\n```xml\n\u003cStyleInclude Source=\"avares://Classic.Avalonia.Theme.ColorPicker/Classic.axaml\"/\u003e\n```\n\n### Dock\nThere is also a classic theme for a fantastic [Wieslaw's Dock control](https://github.com/wieslawsoltes/Dock), install the `Classic.Avalonia.Theme.Dock` package and include the style in `App.axaml`:\n```xml\n\u003cStyleInclude Source=\"avares://Classic.Avalonia.Theme.Dock/Classic.axaml\" /\u003e\n```\n\n### Color Scheme\n\nTo customize the color scheme, set the `RequestedThemeVariant` in `App.axaml` or for individual controls:\n```xml\nRequestedThemeVariant=\"{x:Static ClassicTheme.Brick}\"\n```\n\n### Font Usage\n\nWhile Windows 9x used the bitmap font MS Sans Serif for its distinctive appearance, bitmap fonts have compatibility issues. Instead, the Classic.Avalonia theme uses Tahoma (introduced in Windows XP) without anti-aliasing for a similar look. Though it’s not perfect—letters may sometimes appear too close together, especially on macOS—it’s the closest match for now.\n\nTahoma is available on Windows and macOS, but not Linux. A free alternative, 'Wine Tahoma Regular,' is distributed under the GNU Lesser General Public License, but I’m unsure if it’s compatible with the MIT license. Any insights would be appreciated.\n\n#### Font aliasing\n\nFor the old look and feel, Classic.Avalonia disables antialiasing (smoothing) for font rendering. If for some reason, you would like to use Classic.Avalonia **with** font antialiasing, set property `FontAliasing` on the `ClassicTheme`:\n\n```\n\u003cclassic:ClassicTheme FontAliasing=\"False\" /\u003e\n```\n\n## Custom Controls\n\n`Classic.Avalonia` introduces several custom controls with a classic appearance and behavior.\n\nThese controls (excluding `ClassicWindow`) are part of the `Classic.CommonControls.Avalonia` assembly and can be used independently of `Classic.Avalonia.Theme`. Who knows, maybe a Luna theme is coming next?\n\n\u003e #### How to use `Classic.CommonControls.Avalonia` without Classic theme\n\u003e You can use new controls **without** classic theming, i.e. if Classic theme is only one of many themes your app supports, but you still want to use ToolBar or MessageBox control. Just include the following style:\n\u003e ```\n\u003e \u003cStyleInclude Source=\"avares://Classic.CommonControls.Avalonia/Themes/Fluent.axaml\" /\u003e\n\u003e ```\n\u003e **!!** Include it **ONLY** if you want to use new controls with `\u003cFluentTheme /\u003e`. Don't do it if you use `\u003cClassicTheme /\u003e`\n\n### ClassicWindow\n\nBy default, windows don't have the classic titlebar/chrome. To enable a classic titlebar, inherit from `ClassicWindow` instead of the `Window` class.\n\nIf inheriting from `ClassicWindow` isn't feasible (for example, if Classic is just one of multiple themes), you can apply the `ClassicWindow` theme like this:\n```xml\nTheme=\"{StaticResource ClassicWindow}\"\n```\n\n**Note**: On Windows 11, the default `Window` class results in rounded corners, which may detract from the classic look. Inherit from `ClassicWindow` to avoid this.\n\n### MessageBox\n\nFor a classic Windows-style MessageBox:\n```csharp\nvar result = await MessageBox.ShowDialog(parentWindow, \"This is a message box\", \"Title\", MessageBoxButtons.Ok, MessageBoxIcon.Information);\n```\n\nTo enable classic Windows sounds, add `.UseMessageBoxSounds()` in `Program.cs`:\n```csharp\npublic static AppBuilder BuildAvaloniaApp()\n    =\u003e AppBuilder.Configure\u003cApp\u003e()\n        ...\n        .UseMessageBoxSounds()\n        ...\n```\n\n![MessageBox example](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/messagebox.png)\n\n*(If you can't hear the screenshot above, you might be too young!)*\n\n### ToolBar\n\nMSDN defines a toolbar as \"a control containing one or more buttons.\"\n\nUse `\u003ccommonControls:ToolBar\u003e` to host any controls. To add buttons, use `\u003ccommonControls:ToolBarButton\u003e` with properties such as `Text`, `SmallIcon` (16px), or `LargeIcon` (24px). Set `IsToggleButton` to enable toggle functionality.\n\nThe ToolBar supports small and large sizes, various text placements (Down, Right, or NoText), and can automatically grayscale icons (`GrayscaleIcons`).\n\n![ToolBar Example](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/toolbar.png)\n\n### ListView\n\nA classic ListView which is a ListBox with a predefined template - an icon with text. Supports three views: Icon, SmallIcon, List.\n\nUse `\u003ccommonControls:ListView\u003e` with `\u003ccommonControls:ListViewItem\u003e` children. If you want to bind a custom objects, use styles to bind text and icon (don't use ItemTemplate):\n```\n\u003ccommonControls:ListView.Styles\u003e\n    \u003cStyle Selector=\"commonControls|ListViewItem\"\u003e\n        \u003cSetter Property=\"SmallIcon\" Value=\"{Binding SmallIcon}\" /\u003e\n        \u003cSetter Property=\"LargeIcon\" Value=\"{Binding LargeIcon}\" /\u003e\n        \u003cSetter Property=\"Text\" Value=\"{Binding Text}\" /\u003e\n    \u003c/Style\u003e\n\u003c/commonControls:ListView.Styles\u003e\n```\n\n![ToolBar Example](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/listview_icons.gif)\n\n\n### AboutDialog\n\nFor a classic Windows 9x-style 'About' dialog:\n```csharp\nvar bitmap = new Bitmap(AssetLoader.Open(new Uri(\"avares://YourAssembly/YourPathToIcon.png\")));\nawait AboutDialog.ShowDialog(parentWindow, \"Notepad\", \"Copyright (C) 1985-1999\", bitmap);\n```\n\n![AboutDialog Example](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/aboutdialog.png)\n\n### FontDialog\n\nFor a classic Windows Font picker dialog:\n```csharp\nvar font = await FontDialog.ShowDialog(parentWindow);\nif (font != null)\n{\n    Font = font.Family;\n    FontStyle = font.Style;\n    FontWeight = font.Weight;\n    FontSize = font.Size;\n}\n```\n\n![FontDialog Example](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/fontdialog.png)\n\n## Example Screenshots\n\n![Avalonia Visual Basic](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/avalonia_basic.gif)\n![Avalonia Internet Explorer](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/avalonia_explorer1.png)\n![Avalonia Notepad](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/notepad.png)\n![Avalonia Internet Explorer Internet Options](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/avalonia_explorer2.png)\n![Avalonia Internet Explorer Internet Options](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/avalonia_explorer3.png)\n![Avalonia Internet Explorer Internet Options](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/avalonia_explorer4.png)\n![Avalonia Internet Explorer Internet Options](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/avalonia_explorer5.png)\n![Avalonia Internet Explorer Internet Options](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/avalonia_explorer6.png)\n![Avalonia Internet Explorer Internet Options](https://raw.githubusercontent.com/BAndysc/Classic.Avalonia/refs/heads/master/samples/examples/avalonia_explorer7.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandysc%2Fclassic.avalonia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbandysc%2Fclassic.avalonia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandysc%2Fclassic.avalonia/lists"}