{"id":15418157,"url":"https://github.com/asklar/xamlstraddle","last_synced_at":"2025-09-03T02:32:14.240Z","repository":{"id":65346534,"uuid":"283135417","full_name":"asklar/XamlStraddle","owner":"asklar","description":"A library to dual target system XAML and WinUI","archived":false,"fork":false,"pushed_at":"2023-01-18T15:38:15.000Z","size":28,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-11T19:44:28.993Z","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/asklar.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":"2020-07-28T07:29:52.000Z","updated_at":"2025-02-19T17:19:42.000Z","dependencies_parsed_at":"2023-02-10T16:01:08.650Z","dependency_job_id":null,"html_url":"https://github.com/asklar/XamlStraddle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/asklar/XamlStraddle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asklar%2FXamlStraddle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asklar%2FXamlStraddle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asklar%2FXamlStraddle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asklar%2FXamlStraddle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asklar","download_url":"https://codeload.github.com/asklar/XamlStraddle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asklar%2FXamlStraddle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273380396,"owners_count":25095179,"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-09-03T02:00:09.631Z","response_time":76,"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":"2024-10-01T17:19:35.011Z","updated_at":"2025-09-03T02:32:13.943Z","avatar_url":"https://github.com/asklar.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XamlStraddle\nA library to dual target system XAML and WinUI\n\n## Description\nThis is a C++ header-only library that allows your app or library to seamlessly target either UWP XAML and WinUI 3. This is achieved via type and namespace aliases.\nCurrently the library can target **WinUI 3 Preview 2**.\n\nYour app can switch from UWP XAML to WinUI 3 by defining a pre-processor variable `USE_WINUI3`.\n\nThe syntax for `packages.config` does not allow runtime conditional behavior, so your project's `packages.config` will have to include WinUI 3 (and WinUI 2 if you use it) always, and then at build time one or the other will be used.\n\n\nIn your msbuild project (vcxproj) file:\n```xml\n  \u003cItemDefinitionGroup\u003e\n    \u003c!-- Enlighten C++ code about WinUI3 --\u003e\n    \u003cClCompile\u003e\n      \u003cPreprocessorDefinitions\u003eUSE_WINUI3;%(PreprocessorDefinitions)\u003c/PreprocessorDefinitions\u003e\n    \u003c/ClCompile\u003e\n    \u003c!-- Enlighten IDL interfaces about WinUI3 --\u003e\n    \u003cMidl\u003e\n      \u003cPreprocessorDefinitions\u003eUSE_WINUI3;%(PreprocessorDefinitions)\u003c/PreprocessorDefinitions\u003e\n    \u003c/Midl\u003e\n  \u003c/ItemDefinitionGroup\u003e\n```\n\n## How to use\nInstead of including `\u003cwinrt/Windows.UI.Xaml.h\u003e` etc., just include `\u003cUI.Xaml.h\u003e`.\nThen when use the namespace aliases, e.g. instead of `winrt::Windows::UI::Xaml` (or WinUI 3's `winrt::Microsoft::UI::Xaml`) use the `xaml` alias.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasklar%2Fxamlstraddle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasklar%2Fxamlstraddle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasklar%2Fxamlstraddle/lists"}