{"id":17718665,"url":"https://github.com/jsuarezruiz/xamarin.forms.composite","last_synced_at":"2025-05-06T18:50:45.486Z","repository":{"id":80274339,"uuid":"222128624","full_name":"jsuarezruiz/Xamarin.Forms.Composite","owner":"jsuarezruiz","description":"Tests and prototypes using Xamarin.Forms Composite Controls and ControlTemplate","archived":false,"fork":false,"pushed_at":"2019-11-17T18:39:47.000Z","size":756,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-02T05:31:55.620Z","etag":null,"topics":["composite","controls","controltemplate","ui","xamarin","xamarin-forms"],"latest_commit_sha":null,"homepage":null,"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/jsuarezruiz.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-16T16:37:31.000Z","updated_at":"2021-02-09T16:31:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"da9d92fc-207c-4f85-8cb5-985fa8832781","html_url":"https://github.com/jsuarezruiz/Xamarin.Forms.Composite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsuarezruiz%2FXamarin.Forms.Composite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsuarezruiz%2FXamarin.Forms.Composite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsuarezruiz%2FXamarin.Forms.Composite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsuarezruiz%2FXamarin.Forms.Composite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsuarezruiz","download_url":"https://codeload.github.com/jsuarezruiz/Xamarin.Forms.Composite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252750341,"owners_count":21798685,"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":["composite","controls","controltemplate","ui","xamarin","xamarin-forms"],"created_at":"2024-10-25T14:55:25.222Z","updated_at":"2025-05-06T18:50:45.457Z","avatar_url":"https://github.com/jsuarezruiz.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xamarin.Forms Composite Controls\n\nIn this repository there are only some tests related to the idea of composite controls, have a **Template** property and be able to use **ControlTemplate** to customize a control.\n\n![Composite Controls](images/xamarinforms-controltemplate.gif)\n\n## Let's see more details!\n\nFor these tests we have created a Slider Composite control (composed of other Views that make up the control).\n\n![Composite Control](images/composite-control.png)\n\nWe have the same visual appearance, properties and events. However, the control has a Template property that allows us to modify the ControlTemplate that defines the control.\n\nWe modify the Slider ControlTemplate:\n\n```\n\u003cControlTemplate x:Key=\"CustomSliderTemplate\"\u003e\n    \u003cGrid \n        VerticalOptions=\"Center\"\n        Margin=\"10, 0\"\u003e\n        \u003cBoxView \n            x:Name=\"MaximumTrack\"\n            BackgroundColor=\"Green\"\n            Margin=\"6,0\"\n            CornerRadius=\"6\"\n            HeightRequest=\"6\"\n            Opacity=\"0.24\"\n            VerticalOptions=\"Center\" /\u003e\n        \u003cBoxView \n            x:Name=\"MinimumTrack\"\n            BackgroundColor=\"Green\"\n            Margin=\"6,0\"\n            CornerRadius=\"6\"\n            HeightRequest=\"6\"\n            HorizontalOptions=\"Start\"\n            InputTransparent=\"True\"\n            VerticalOptions=\"Center\"\n            WidthRequest=\"0\" /\u003e\n        \u003cImage        \n            x:Name=\"Thumb\" \n            Margin=\"0\"\n            BackgroundColor=\"Transparent\"\n            Source=\"football.png\"\n            HeightRequest=\"36\"\n            HorizontalOptions=\"Start\"\n            VerticalOptions=\"Center\"\n            WidthRequest=\"36\" /\u003e\n    \u003c/Grid\u003e\n\u003c/ControlTemplate\u003e\n```\n\nAnd we use it:\n\n```\n\u003cSlider \n    Template=\"{StaticResource CustomSliderTemplate}\"/\u003e\n```\n\nThe result:\n\n![ControlTemplate](images/slider-controltemplate.png)\n\nWe can use XAML Hot Reload to adjust the appearance:\n\n![Using XAML Hot Reload](images/xamarinforms-edit-controltemplate.gif)\n\nSome **performance** related data (using Android):\n\nMemory\n* 127545344 (121MB) - Slider\n* 127246336 (121MB) - Slider (Composite)\n\nStartup time (Release AOT)\n* 797ms - Slider\n* 801ms - Slider (Composite)\n\n## Feedback\nYou can create feedback in this repository. If you have any questions, please don't hesitate to create an issue.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsuarezruiz%2Fxamarin.forms.composite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsuarezruiz%2Fxamarin.forms.composite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsuarezruiz%2Fxamarin.forms.composite/lists"}