{"id":29930384,"url":"https://github.com/windowsnt/winui3-cpp-controls","last_synced_at":"2025-08-02T16:14:46.913Z","repository":{"id":307649995,"uuid":"1030243275","full_name":"WindowsNT/WinUI3-CPP-Controls","owner":"WindowsNT","description":"A port of the community toolkit for C# into C++ for Desktop WinUI3 apps.","archived":false,"fork":false,"pushed_at":"2025-08-01T11:23:02.000Z","size":244,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-01T12:47:21.172Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/WindowsNT.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,"zenodo":null}},"created_at":"2025-08-01T10:10:50.000Z","updated_at":"2025-08-01T11:23:05.000Z","dependencies_parsed_at":"2025-08-01T12:47:22.785Z","dependency_job_id":"573650b9-5499-4f74-9a54-334c6326da8a","html_url":"https://github.com/WindowsNT/WinUI3-CPP-Controls","commit_stats":null,"previous_names":["windowsnt/winui3-cpp-controls"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/WindowsNT/WinUI3-CPP-Controls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindowsNT%2FWinUI3-CPP-Controls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindowsNT%2FWinUI3-CPP-Controls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindowsNT%2FWinUI3-CPP-Controls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindowsNT%2FWinUI3-CPP-Controls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WindowsNT","download_url":"https://codeload.github.com/WindowsNT/WinUI3-CPP-Controls/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindowsNT%2FWinUI3-CPP-Controls/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268416770,"owners_count":24246979,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-02T16:14:46.345Z","updated_at":"2025-08-02T16:14:46.900Z","avatar_url":"https://github.com/WindowsNT.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WinUI3 C++ controls\n\nFrom the WinUI3 Community Kit which is C# only I am porting some controls to C++. Including a Sample application that demonstrates them.\nCurrently, Resizer and StaggeredLayout are available.\n\n## Resizer\n\nA control to change a double property. \n\n1. Put the style to your generic.xaml in Themes\\ (change the namespace)\n2. Put Resizer h/cpp/idl to your project, changing the namespace\n\nTo your layout then:\n\n```\n\u003clocal:Resizer\n\tMinimum=\"100\"\n\tMaximum=\"400\"\n\tOrientation=\"Horizontal\"\n\tValue=\"{x:Bind R1,Mode=TwoWay}\"/\u003e\n```\n\nThis creates a horizontal splitter (Vertical is also supported) which modifies the double value R1. This value can then be used into another control:\n\n```\n\u003cStackPanel Orientation=\"Horizontal\"\u003e\n\t\u003cTextBlock Width=\"{x:Bind R1,Mode=OneWay\"\u003eText 1\u003c/TextBlock\u003e\n\t\u003clocal:Resizer Minimum=\"100\" Maximum=\"100\" Orientation=\"Vertical\" Value=\"{x:Bind R1,Mode=TwoWay}\" /\u003e\n\t\u003cTextBlock \u003eText 2\u003c/TextBlock\u003e\n\u003c/StackPanel\u003e\n```\n\nYou can also use it on a grid to size the entire grid row or column by having the ColumnDefinition's Width bound to that variable.\n\nFor a full example, see [XAML Lab](https://github.com/WindowsNT/XAML-Lab/), direct link [here](https://www.turbo-play.com/update2/tu.php?p=f3cf159b-de75-4427-8fe0-81a7ae61d3fa\u0026f=88887777-A932-7654-A2E5-DECB481E355D).\n\n\n## StaggeredLayout\n\nA panel  that arranges its children in a staggered grid layout, similar to a masonry layout.\nPut the StaggeredLayout h/cpp/idl to your project, changing the namespace. No generic.xaml is needed for this control.\n\n```\n\u003cScrollViewer Grid.Row=\"1\" Grid.Column=\"0\"\u003e\n    \u003cItemsRepeater VerticalAlignment=\"Stretch\" x:Name=\"MyRepeater\"  ItemsSource=\"{x:Bind TheItems,Mode=OneWay}\"\u003e\n        \u003cItemsRepeater.Layout\u003e\n            \u003clocal:StaggeredLayout ColumnCount=\"10\"/\u003e\n        \u003c/ItemsRepeater.Layout\u003e\n\n        \u003cItemsRepeater.ItemTemplate\u003e\n            \u003cDataTemplate x:DataType=\"local:Item\"\u003e\n                \u003cRectangle Fill=\"SteelBlue\"\n                        Width=\"50\"\n                            HorizontalAlignment=\"Stretch\"\n                        Height=\"{x:Bind Number1}\"  Margin=\"1\"/\u003e\n            \u003c/DataTemplate\u003e\n        \u003c/ItemsRepeater.ItemTemplate\u003e\n    \u003c/ItemsRepeater\u003e\n\u003c/ScrollViewer\u003e\n```\n\n```\n// Example data: 30 rectangles of random height\nwinrt::Windows::Foundation::Collections::IObservableVector\u003cwinrt::Sample::Item\u003e items =\n    winrt::single_threaded_observable_vector\u003cwinrt::Sample::Item\u003e();\nwinrt::Windows::Foundation::Collections::IObservableVector\u003cwinrt::Sample::Item\u003e TheItems()\n{\n    items.Clear();\n            \n    for (int i = 0; i \u003c 30; ++i)\n    {\n\t\tint height = std::uniform_int_distribution  \u003cint\u003e(10, 50)(gen);\n\t\twinrt::Sample::Item item;\n\t\titem.Number1((double)height);\n\t\titems.Append(item);\n    }\n    return items;\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindowsnt%2Fwinui3-cpp-controls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwindowsnt%2Fwinui3-cpp-controls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindowsnt%2Fwinui3-cpp-controls/lists"}