{"id":13592865,"url":"https://github.com/ControlzEx/ControlzEx","last_synced_at":"2025-04-09T02:31:26.493Z","repository":{"id":41092673,"uuid":"44004571","full_name":"ControlzEx/ControlzEx","owner":"ControlzEx","description":"Shared Controlz for WPF and ... more","archived":false,"fork":false,"pushed_at":"2024-10-24T15:51:21.000Z","size":13650,"stargazers_count":972,"open_issues_count":10,"forks_count":120,"subscribers_count":49,"default_branch":"develop","last_synced_at":"2024-10-29T15:17:54.752Z","etag":null,"topics":["control","controlzex","fluentribbon","hacktoberfest","icon-pack","mahapps","open-source","oss","shell","tooltips","windowchrome","windows","wpf","xaml"],"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/ControlzEx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["punker76","batzen"]}},"created_at":"2015-10-10T09:38:46.000Z","updated_at":"2024-10-28T01:04:57.000Z","dependencies_parsed_at":"2022-08-10T01:42:44.396Z","dependency_job_id":"4ae15c7e-a340-4cd2-9fd2-cdc2875728ba","html_url":"https://github.com/ControlzEx/ControlzEx","commit_stats":{"total_commits":1123,"total_committers":19,"mean_commits":59.10526315789474,"dds":"0.20747996438112204","last_synced_commit":"cbb56cab39ffc78d9599208826f47eeab70455f7"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ControlzEx%2FControlzEx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ControlzEx%2FControlzEx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ControlzEx%2FControlzEx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ControlzEx%2FControlzEx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ControlzEx","download_url":"https://codeload.github.com/ControlzEx/ControlzEx/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947835,"owners_count":21023059,"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":["control","controlzex","fluentribbon","hacktoberfest","icon-pack","mahapps","open-source","oss","shell","tooltips","windowchrome","windows","wpf","xaml"],"created_at":"2024-08-01T16:01:14.134Z","updated_at":"2025-04-09T02:31:26.478Z","avatar_url":"https://github.com/ControlzEx.png","language":"C#","readme":"﻿\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eControlzEx\u003c/h1\u003e\n  \u003cp\u003e\n    Shared Controlz for WPF\n  \u003c/p\u003e\n  \u003cp\u003e\n    Supporting .NET Framework (4.6.2 and greater) and .NET (6 and greater)\n  \u003c/p\u003e\n  \u003ca href=\"https://github.com/ControlzEx/ControlzEx\"\u003e\n    \u003cimg alt=\"ControlzEx\" with=\"200\" height=\"200\" src=\"logo-mini.png\"\u003e\n  \u003c/a\u003e\n\n[![Build status](https://img.shields.io/appveyor/ci/punker76/controlzex.svg?style=flat-square)](https://ci.appveyor.com/project/punker76/controlzex)\n[![Release](https://img.shields.io/github/release/ControlzEx/ControlzEx.svg?style=flat-square)](https://github.com/ControlzEx/ControlzEx/releases/latest)\n[![Downloads](https://img.shields.io/nuget/dt/ControlzEx.svg?style=flat-square)](http://www.nuget.org/packages/ControlzEx/)\n[![Issues](https://img.shields.io/github/issues/ControlzEx/ControlzEx.svg?style=flat-square)](https://github.com/ControlzEx/ControlzEx/issues)\n[![Nuget](https://img.shields.io/nuget/vpre/ControlzEx.svg?style=flat-square)](http://nuget.org/packages/ControlzEx)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/ControlzEx/ControlzEx/blob/main/License.txt)\n\n[![Twitter Jan](https://img.shields.io/badge/twitter-%40punker76-55acee.svg?style=flat-square)](https://twitter.com/punker76) [![Twitter Bastian](https://img.shields.io/badge/twitter-%40batzendev-55acee.svg?style=flat-square)](https://twitter.com/batzendev) [![Twitter James](https://img.shields.io/badge/twitter-%40James_Willock-55acee.svg?style=flat-square)](https://twitter.com/James_Willock)\n\n\u003c/div\u003e\n\n## Let's get started\n\n- A history of changes is maintained in the [Changelog](Changelog.md).\n- The roadmap is done by [milestones](../../milestones).\n- [Releases and Release Notes](../../releases)\n- Development requirements\n  - .NET SDK 8.0.401 or later\n  - An IDE that supports the required .NET SDK (for example Rider 2024.1, Visual Studio 2022 (17.10) or later)\n\n## TextBoxInputMaskBehavior\n\nThe `TextBoxInputMaskBehavior` can be used to show a mask inside a `TextBox`.\n\nNote: It's only a mask and does not validate your text.\n\n```xml\n\u003cTextBlock Grid.Row=\"0\"\n           Grid.Column=\"0\"\n           Margin=\"4\"\n           Text=\"Datetime\" /\u003e\n\u003cTextBox Grid.Row=\"0\"\n         Grid.Column=\"1\"\n         Margin=\"4\"\u003e\n    \u003cbehaviors:Interaction.Behaviors\u003e\n        \u003ccontrolzEx:TextBoxInputMaskBehavior InputMask=\"00/00/0000\" /\u003e\n    \u003c/behaviors:Interaction.Behaviors\u003e\n\u003c/TextBox\u003e\n\n\u003cTextBlock Grid.Row=\"1\"\n           Grid.Column=\"0\"\n           Margin=\"4\"\n           Text=\"Phone Number\" /\u003e\n\u003cTextBox Grid.Row=\"1\"\n         Grid.Column=\"1\"\n         Margin=\"4\"\u003e\n    \u003cbehaviors:Interaction.Behaviors\u003e\n        \u003ccontrolzEx:TextBoxInputMaskBehavior InputMask=\"( 999 ) 000 000 - 00\"\n                                             PromptChar=\"_\" /\u003e\n    \u003c/behaviors:Interaction.Behaviors\u003e\n\u003c/TextBox\u003e\n```\n\nThe original TextBoxInputMaskBehavior was taken from from Blindmeis's Blog.\n\n- [https://blindmeis.wordpress.com/2015/01/20/wpf-textbox-input-behavior/](https://blindmeis.wordpress.com/2015/01/20/wpf-textbox-input-behavior/)\n- [https://blindmeis.wordpress.com/2010/06/01/wpf-masked-textbox-behavior/](https://blindmeis.wordpress.com/2010/06/01/wpf-masked-textbox-behavior/)\n\n![InputMaskScreenshot](https://user-images.githubusercontent.com/658431/31741772-c3fdd41c-b455-11e7-8110-7b54d636ede8.png)\n\n## KeyboardNavigationEx\n\nThe `KeyboardNavigationEx` is a helper class for a common focusing problem.\nThe focus of an UI element itself isn't the problem. But if we use the common focusing methods, the control gets the focus, but it doesn't get the focus visual style.\n\nThe original `KeyboardNavigation` class handles the visual style only if the control gets the focus from a keyboard device or if the SystemParameters.KeyboardCues is true.\n\nWith `KeyboardNavigationEx` you can fix this in two simple ways.\n\nIn code behind:\n\n```csharp\npublic partial class MainWindow : Window\n{\n    public MainWindow()\n    {\n        InitializeComponent();\n        this.Loaded += (s, e) =\u003e { KeyboardNavigationEx.Focus(this.TheElementWhichShouldGetTheFocus); };\n    }\n}\n```\n\nor in XAML:\n\n```xaml\n\u003cButton controlzex:KeyboardNavigationEx.AlwaysShowFocusVisual=\"True\"\u003eHey, I get the focus visual style on mouse click!\u003c/Button\u003e\n```\n\n![keyboardfocusex](https://cloud.githubusercontent.com/assets/658431/15276251/143b9b3e-1ae3-11e6-9fe0-dc704675ad3b.gif)\n\n## AutoMove ToolTip\n\nAn auto moving ToolTip. More [Info](https://jkarger.de/2014/11/02/how-to-make-the-tooltip-follow-the-mouse/).\n\n```xaml\n\u003cButton Margin=\"5\"\n        Padding=\"5\"\n        Content=\"Test Button 2\"\n        ToolTipService.ShowDuration=\"20000\"\u003e\n    \u003cButton.ToolTip\u003e\n        \u003cToolTip local:ToolTipAssist.AutoMove=\"True\"\u003e\n            \u003cToolTip.Template\u003e\n                \u003cControlTemplate\u003e\n                    \u003cGrid\u003e\n                        \u003cBorder Background=\"Gray\"\n                                BorderBrush=\"Black\"\n                                BorderThickness=\"1\"\n                                Opacity=\"0.9\"\n                                SnapsToDevicePixels=\"True\" /\u003e\n                        \u003cTextBlock Margin=\"5\"\n                                    Foreground=\"WhiteSmoke\"\n                                    FontSize=\"22\"\n                                    Text=\"ToolTipHelper AutoMove sample\"\n                                    TextOptions.TextFormattingMode=\"Display\"\n                                    TextOptions.TextRenderingMode=\"ClearType\" /\u003e\n                    \u003c/Grid\u003e\n                \u003c/ControlTemplate\u003e\n            \u003c/ToolTip.Template\u003e\n        \u003c/ToolTip\u003e\n    \u003c/Button.ToolTip\u003e\n\u003c/Button\u003e\n```\n\n![automove_tooltip2](https://cloud.githubusercontent.com/assets/658431/13525375/d708a9e8-e200-11e5-9bd9-035d50632b34.gif)\n\n![automove_tooltip](https://cloud.githubusercontent.com/assets/658431/13509772/7ff7406a-e18d-11e5-9238-e48c6e4fa2fa.gif)\n\n## GlowWindowBehavior\n\nThe `GlowWindowBehavior` adds a Glow around your window.  \nStarting with Windows 11 the behavior can be used to control the color of the native window border and automatically does so, when Windows 11 is detected.  \nThis can be turned off by setting `PreferDWMBorder` to `false`.\n\n## WindowChromeBehavior\n\nControlzEx provides a custom chrome for WPF windows and some other deeper fixes for it.\n\nWhat it does provide:\n\n- Draw anywhere inside the window (including the titlebar)\n- Supports every `WindowStyle` (`None`, `SingleBorderWindow`, `ThreeDBorderWindow` and `ToolWindow`)\n- Supports jitter free window resizes\n- Allows you to ignore the taskbar when the window is maximized\n- Provides an `IsNCActive` property\n- Mitigates a bug in Windows that causes newly shown windows to briefly be shown with a pure white background\n- Starting with Windows 11:\n  - Allows you to control rounded corners (through `CornerPreference`)\n  - Supports snap menu on window buttons (through attached properties like `NonClientControlProperties.HitTestResult` and `NonClientControlProperties.ClickStrategy`)\n\nMost of the fixes and improvements are from [MahApps.Metro](https://github.com/MahApps/MahApps.Metro) and [Fluent.Ribbon](https://github.com/fluentribbon/Fluent.Ribbon).\n\nConcrete implementation of techniques described here:\n\n[Blog entry from Microsoft on custom Window chrome](https://web.archive.org/web/20150221141007/http://blogs.msdn.com/b/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx)\n\nIt's a fork of the original Microsoft WPF Shell Integration Library. Current Microsoft's implementation can be found:\n\n- [https://github.com/dotnet/wpf](https://github.com/dotnet/wpf)\n- [http://referencesource.microsoft.com](http://referencesource.microsoft.com)\n\n## PopupEx\n\nCustom `Popup` that can be used in validation error templates or something else like in [MaterialDesignInXamlToolkit](https://github.com/ButchersBoy/MaterialDesignInXamlToolkit) or [MahApps.Metro](https://github.com/MahApps/MahApps.Metro).\n\n`PopupEx` provides some additional nice features:\n\n- repositioning if host-window size or location changed\n- repositioning if host-window gets maximized and vice versa\n- it's only topmost if the host-window is activated  \n\n![2015-10-11_01h03_05](https://cloud.githubusercontent.com/assets/658431/10413784/ea365626-6fb6-11e5-9abc-c174159dcbf8.png)\n\n## TabControlEx\n\nCustom `TabControl` that keeps the `TabItem` content in the VisualTree while unselecting them, so no re-create nightmare is done, after selecting the `TabItem` again. The visibility behavior can be set by `ChildContentVisibility` dependency property.\n\nUsage:\n\n```xaml\n\u003ccontrolz:TabControlEx\u003e\n    \u003cTabItem Header=\"Lorem\"\u003e\n        \u003cTextBlock Text=\"Lorem ipsum dolor sit amet, consetetur sadipscing\"\n                   HorizontalAlignment=\"Center\"\n                   FontSize=\"30\" /\u003e\n    \u003c/TabItem\u003e\n    \u003cTabItem Header=\"ipsum\"\u003e\n        \u003cTextBox Text=\"Lorem ipsum dolor sit amet, consetetur sadipscing\"\n                 HorizontalAlignment=\"Center\"\n                 Margin=\"5\" /\u003e\n    \u003c/TabItem\u003e\n\u003c/controlz:TabControlEx\u003e\n```\n\n## PackIconBase\n\nA base class to help drive a common method for creating icon packs in WPF.\n\nTo create a new icon pack follow these steps:  \n\nDefine a key (typically an ```enum```):\n\n```csharp\npublic enum PackIconKind\n{\n    Happy,\n    Sad\n}\n```\n\nSubclass ```PackIconBase```, adding\n\n- Default style key\n- A factory providing Path data for each key\n\n```csharp\npublic class PackIcon : PackIconBase\u003cPackIconKind\u003e\n{\n    static PackIcon()\n    {\n        DefaultStyleKeyProperty.OverrideMetadata(typeof(PackIcon), new FrameworkPropertyMetadata(typeof(PackIcon)));\n    }\n\n    public PackIcon() : base(CreateIconData)\n    { }\n\n    private static IDictionary\u003cPackIconKind, string\u003e CreateIconData()\n    {\n        return new Dictionary\u003cPackIconKind, string\u003e\n        {\n            {PackIconKind.Happy, \"M20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M10,9.5C10,10.3 9.3,11 8.5,11C7.7,11 7,10.3 7,9.5C7,8.7 7.7,8 8.5,8C9.3,8 10,8.7 10,9.5M17,9.5C17,10.3 16.3,11 15.5,11C14.7,11 14,10.3 14,9.5C14,8.7 14.7,8 15.5,8C16.3,8 17,8.7 17,9.5M12,17.23C10.25,17.23 8.71,16.5 7.81,15.42L9.23,14C9.68,14.72 10.75,15.23 12,15.23C13.25,15.23 14.32,14.72 14.77,14L16.19,15.42C15.29,16.5 13.75,17.23 12,17.23Z\"},\n            {PackIconKind.Sad, \"M20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M15.5,8C16.3,8 17,8.7 17,9.5C17,10.3 16.3,11 15.5,11C14.7,11 14,10.3 14,9.5C14,8.7 14.7,8 15.5,8M10,9.5C10,10.3 9.3,11 8.5,11C7.7,11 7,10.3 7,9.5C7,8.7 7.7,8 8.5,8C9.3,8 10,8.7 10,9.5M12,14C13.75,14 15.29,14.72 16.19,15.81L14.77,17.23C14.32,16.5 13.25,16 12,16C10.75,16 9.68,16.5 9.23,17.23L7.81,15.81C8.71,14.72 10.25,14 12,14Z\"}\n        };\n    }\n}\n```\n\nProvide a default style (typically in your Generic.xaml, e.g:\n\n```xaml\n\u003cStyle TargetType=\"{x:Type local:PackIcon}\"\u003e\n    \u003cSetter Property=\"Height\" Value=\"16\" /\u003e\n    \u003cSetter Property=\"Width\" Value=\"16\" /\u003e\n    \u003cSetter Property=\"HorizontalAlignment\" Value=\"Left\" /\u003e\n    \u003cSetter Property=\"VerticalAlignment\" Value=\"Top\" /\u003e\n    \u003cSetter Property=\"IsTabStop\" Value=\"False\" /\u003e\n    \u003cSetter Property=\"Template\"\u003e\n        \u003cSetter.Value\u003e\n            \u003cControlTemplate TargetType=\"{x:Type local:PackIcon}\"\u003e\n                \u003cViewbox\u003e\n                    \u003cCanvas Width=\"24\" Height=\"24\"\u003e\n                        \u003cPath Data=\"{Binding Data, RelativeSource={RelativeSource TemplatedParent}}\"\n                              Fill=\"{TemplateBinding Foreground}\" /\u003e\n                    \u003c/Canvas\u003e\n                \u003c/Viewbox\u003e\n            \u003c/ControlTemplate\u003e\n        \u003c/Setter.Value\u003e\n    \u003c/Setter\u003e\n\u003c/Style\u003e\n```\n\nYour users should now have a simple way to use your icon pack in their applications:\n\n```xaml\n\u003cns:PackIcon Kind=\"HappyIcon\" /\u003e\n```\n\n## Theming\n\nControlzEx provides a `ThemeManager` which helps you to provide Theming to your App.  \nFor more information see [this section](Wiki/ThemeManager.md).\n\n## Licence\n\nThe MIT License (MIT)\n\nCopyright (c) since 2015 Jan Karger, Bastian Schmidt, James Willock\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","funding_links":["https://github.com/sponsors/punker76","https://github.com/sponsors/batzen"],"categories":["C#","UI Controls","C\\#"],"sub_categories":["Control Suites"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FControlzEx%2FControlzEx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FControlzEx%2FControlzEx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FControlzEx%2FControlzEx/lists"}