{"id":19716243,"url":"https://github.com/noobsoftware/xamlfind","last_synced_at":"2026-06-17T10:31:44.142Z","repository":{"id":187513942,"uuid":"551463830","full_name":"noobsoftware/XamlFind","owner":"noobsoftware","description":"XamlFind lets you Query XAML in Xamarin Forms as well as copying XAML elements.","archived":false,"fork":false,"pushed_at":"2022-10-14T13:13:13.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"Main","last_synced_at":"2024-06-14T19:37:51.614Z","etag":null,"topics":["c-sharp","library","querying","xamarin-forms","xaml"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noobsoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-10-14T12:56:43.000Z","updated_at":"2024-06-14T17:21:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"8151c3a2-fd3f-4945-8982-5dd6aa699034","html_url":"https://github.com/noobsoftware/XamlFind","commit_stats":null,"previous_names":["noobsoftware/xamlfind"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noobsoftware%2FXamlFind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noobsoftware%2FXamlFind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noobsoftware%2FXamlFind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noobsoftware%2FXamlFind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noobsoftware","download_url":"https://codeload.github.com/noobsoftware/XamlFind/tar.gz/refs/heads/Main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224188175,"owners_count":17270366,"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":["c-sharp","library","querying","xamarin-forms","xaml"],"created_at":"2024-11-11T22:41:30.256Z","updated_at":"2026-06-17T10:31:44.124Z","avatar_url":"https://github.com/noobsoftware.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XamlFind\n\n# Nuget Package\n\nhttps://www.nuget.org/packages/XamlFind/\n\n# To use the base_page class\n\nMake your MainPage inherit from base_page and create a new namespace within your XAML with the name of your assembly for example: xmlns:d=\"clr-namespace:Player;assembly=Player\" for my project with the namespace Player and then set the type of your page to d:base_page instead of ContentPage\n\n# Querying XAML\n\nQuerying XAML is done with the underscore function or the find function, taking as parameters the parent XAML element and the query selector.\n\nCurrently the selector types that are supported are Element.class or .class or simply Element (Where Element is the name of the element in question and class is the class name and the dot is the query selector for class) StyleId is used to store the class which can be typed within XAML for example as \n```\n\u003cStackLayout StyleId=\".class1.class2\"\u003e\u003c/StackLayout\u003e Or by using the add_class method.\n```\nSelectors can also be chained using the \u003e arrow selector representing the immediate children or the space selector representning all children.\n\nExtra spaces are not allowed so this is an example query selector: ```List\u003cElement\u003e elements = this._(\".class1\u003eElement.class2 .class3\");```\n\nElements returned must then be cast into the approriate elements to be used for example ```List\u003cElement\u003e elements = this._(\"StackLayout.class1\");```\n\nWill return all StackLayouts with class class1\n\nThen to use the StackLayouts do something like this\n```\nforeach(Element e in elements) {\n    StackLayout s = (StackLayout)e;\n    s.BackgroundColor = Color.Red;\n}\n```\n\n# Copying Elements\n```\nStackLayout first = new StackLayout();\n\nStackLayout copy = (StackLayout)this.copy(first);\n```\n\n# Todos:\n  - Update to .NET MAUI (Still waiting for AbsoluteLayout to be supported by .NET MAUI)\n  - Possibly conform better to HTML/CSS standards for example use StyleClass instead of StyleId for classes\n  - Support more selectors\n  - Organize code better and remove some functions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoobsoftware%2Fxamlfind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoobsoftware%2Fxamlfind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoobsoftware%2Fxamlfind/lists"}