{"id":13594173,"url":"https://github.com/dsafa/CSDeskBand","last_synced_at":"2025-04-09T07:30:56.300Z","repository":{"id":49383060,"uuid":"114719072","full_name":"dsafa/CSDeskBand","owner":"dsafa","description":"Windows deskband with C#","archived":false,"fork":false,"pushed_at":"2020-04-03T23:53:44.000Z","size":325,"stargazers_count":275,"open_issues_count":20,"forks_count":65,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-03T11:18:31.337Z","etag":null,"topics":["deskband"],"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/dsafa.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}},"created_at":"2017-12-19T04:26:25.000Z","updated_at":"2024-10-26T13:30:43.000Z","dependencies_parsed_at":"2022-08-12T20:11:07.885Z","dependency_job_id":null,"html_url":"https://github.com/dsafa/CSDeskBand","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsafa%2FCSDeskBand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsafa%2FCSDeskBand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsafa%2FCSDeskBand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsafa%2FCSDeskBand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsafa","download_url":"https://codeload.github.com/dsafa/CSDeskBand/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223375166,"owners_count":17135317,"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":["deskband"],"created_at":"2024-08-01T16:01:29.733Z","updated_at":"2024-11-06T16:30:34.357Z","avatar_url":"https://github.com/dsafa.png","language":"C#","funding_links":[],"categories":["C#","C\\#"],"sub_categories":[],"readme":"# CS DeskBand\nA Library to create [DeskBands](https://msdn.microsoft.com/en-us/library/windows/desktop/cc144099(v=vs.85).aspx) on windows using C#. Deskbands are toolbars that are docked on the taskbar and provide additional functionality to an otherwise unused space.\n\nCSDeskBand makes it easy to create a deskband using Winforms or WPF.\n\n## Screenshots\n![Example 1](images/ex1.png)\n\n![Example 2](images/ex2.png)\n\n_Images taken from the sample projects_\n\n## Table of Contents\n- [Usage](#usage)\n  - [Library Installation](#installation)\n  - [Winforms deskband](#winforms)\n  - [Wpf deskband](#wpf)\n- [Notes](#notes)\n- [Deskband installation](#deskband-installation)\n- [Examples](#examples)\n\n## Version 3.1 (latest)\nRemoved need for `DESKBAND_WPF_TRANSPARENCY` and references to windows forms dlls. Wpf deskbands work with transparency (tested windows 10 1903, might not work before then).\n\n## Version 2 -\u003e version 3 migration\nThe library is now a single `.cs` file. This is to help prevent conflicts if explorer loads different versions.\nThe new entry point for the deskband has also changed.\n\nBefore:\n```cs\n[ComVisible(true)]\n[Guid(\"5731FC61-8530-404C-86C1-86CCB8738D06\")]\n[CSDeskBandRegistration(Name = \"Sample Winforms Deskband\")]\npublic partial class UserControl1 : CSDeskBandWin\n{\n}\n```\nThe main usercontrol would derive from the deskband.\n\nNew:\n```cs\n[ComVisible(true)]\n[Guid(\"FB17B6DA-E3D7-4D17-9E43-3416983372A9\")]\n[CSDeskBand.CSDeskBandRegistration(Name = \"Sample winforms\")]\npublic class Deskband : CSDeskBand.CSDeskBandWin\n{\n    protected override Control Control =\u003e new UserControl1();\n}\n```\nThe entry point is a separate class now and instantiates your main window. It also means that the main deskband window can be any `control`. Remember to re-register the deskband after updating.\n\n\n## Usage\n\n### Installation\nAvailable as a single file at [output/CSDeskBand.cs](https://github.com/dsafa/CSDeskBand/blob/master/output/CSDeskBand.cs). Copy the file and add to your project.\n\n### Winforms\n- Add the compilation symbol `DESKBAND_WINFORMS` to your winforms project.\n- Create a new **public** class that will host your deskband and make it inherit from the abstract class `CSDeskBandWin`. Namespace in `CSDeskBand`\n  - Implement the `Control` property to return your main winforms control.\n- Add `[ComVisible(true)]`, `[Guid(\"xx-xx-xx-xx-xx\")]`, `[CSDeskBandRegistration()]` attributes to the class.\n  - The `CSDeskBandRegistration` attribute allows you to configure:\n    - **Name** : The name of the deskband shown in the toolbars menu\n    - **ShowDeskBand** : True if the deskband should be shown automatically after registration\n\n```C#\nusing CSDeskBand.Win;\nusing CSDeskBand;\n\n[ComVisible(true)]\n[Guid(\"5731FC61-8530-404C-86C1-86CCB8738D06\")]\n[CSDeskBandRegistration(Name = \"Sample Winforms Deskband\")]\npublic partial class UserControl1 : CSDeskBandWin\n{\n    public Deskband()\n    {\n        Options.MinHorizontalSize = new Size(100, 30);\n    }\n\n    protected override Control Control =\u003e new UserControl1(); // Returns your main control\n}\n```\n\n### WPF\n- Add the compilation symbol `DESKBAND_WPF` to your wpf project.\n- Create a new **public** class that will host your deskband and make it inherit from the abstract class `CSDeskBandWpf`. Namespace in `CSDeskBand`\n  - Implement the `UIElement` property to return your main wpf control\n- Add `[ComVisible(true)]`, `[Guid(\"xx-xx-xx-xx-xx\")]`, `[CSDeskBandRegistration()]` attributes to the class.\n  - The `CSDeskBandRegistration` attribute allows you to configure:\n    - **Name** : The name of the deskband shown in the toolbars menu\n    - **ShowDeskBand** : True if the deskband should be shown automatically after registration\n\n```cs\n    [ComVisible(true)]\n    [Guid(\"AA01ACB3-6CCC-497C-9CE6-9211F2EDFC10\")]\n    [CSDeskBandRegistration(Name = \"Sample wpf\")]\n    public class Deskband : CSDeskBandWpf\n    {\n        public Deskband()\n        {\n            Options.ContextMenuItems = ContextMenuItems;\n        }\n\n        protected override UIElement UIElement =\u003e new UserControl1(); // Return the main wpf control\n\n        private List\u003cDeskBandMenuItem\u003e ContextMenuItems\n        {\n            get\n            {\n                var action = new DeskBandMenuAction(\"Action\");\n                return new List\u003cDeskBandMenuItem\u003e() { action };\n            }\n        }\n    }\n```\n\n### Both\nYou can access the `Options` property to change deskband settings such as minimal size or the context menu items available.\nNow you are ready to start working on the deskband like a normal user control.\n\n**Check the [Wiki](https://github.com/dsafa/CSDeskBand/wiki) for more configuration options**\n\n## Notes\nThe nuget packages are outdated and currently not being updated for versions \u003e 3.\n\n## Deskband Installation\nYou need to start an elevated command prompt and be able to use `regasm.exe`. Make sure that you use the correct version of regasm that matches your platform (x86/x64).\n```\ncd ExampleWinforms\\bin\\Debug\n\nregasm /codebase ExampleWinforms.dll\n```\nThe `/codebase` switch will add the path of the dll into the registry entry.\n\nAlternatively, register the assemblies into the Global Assembly Cache.\n```\ngacutil -i ExampleWinforms.dll\nregasm ExampleWinforms.dll\n```\n_Note that GAC installation requires the assemblies to be [Strong-Named](https://docs.microsoft.com/en-us/dotnet/framework/app-domains/strong-named-assemblies)_\n\nHere is an [example .bat file](./tools/install-example.bat) for installing a deskband.\n\n## Examples\nThere are example deskbands included for Winforms and WPF in the [Sample winforms](https://github.com/dsafa/CSDeskBand/tree/master/src/ExampleWinforms) and [Sample wpf](https://github.com/dsafa/CSDeskBand/tree/master/src/ExampleWpf) projects.\n\n## Compatibility\nTested on Windows 10 x64\n\n## Building\nBuilt in Visual studio 2017. The script `tools/merge.ps1` is used to merge the files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsafa%2FCSDeskBand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsafa%2FCSDeskBand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsafa%2FCSDeskBand/lists"}