{"id":26045281,"url":"https://github.com/point-platform/famfamfam-flags-wpf","last_synced_at":"2025-12-29T14:24:29.829Z","repository":{"id":66317871,"uuid":"85866919","full_name":"point-platform/famfamfam-flags-wpf","owner":"point-platform","description":"famfamfam flag icons for WPF","archived":false,"fork":false,"pushed_at":"2022-09-16T00:53:49.000Z","size":401,"stargazers_count":30,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T09:46:55.351Z","etag":null,"topics":["country-flags","csharp","dotnet","famfamfam","flag-icons","flags","icons","iso-3166-1","wpf"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/point-platform.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}},"created_at":"2017-03-22T19:17:27.000Z","updated_at":"2024-02-17T19:22:19.000Z","dependencies_parsed_at":"2023-03-01T22:45:54.648Z","dependency_job_id":null,"html_url":"https://github.com/point-platform/famfamfam-flags-wpf","commit_stats":null,"previous_names":["drewnoakes/famfamfam-flags-wpf"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/point-platform%2Ffamfamfam-flags-wpf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/point-platform%2Ffamfamfam-flags-wpf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/point-platform%2Ffamfamfam-flags-wpf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/point-platform%2Ffamfamfam-flags-wpf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/point-platform","download_url":"https://codeload.github.com/point-platform/famfamfam-flags-wpf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248203836,"owners_count":21064658,"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":["country-flags","csharp","dotnet","famfamfam","flag-icons","flags","icons","iso-3166-1","wpf"],"created_at":"2025-03-07T19:34:40.206Z","updated_at":"2025-12-29T14:24:29.794Z","avatar_url":"https://github.com/point-platform.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NuGet version](https://img.shields.io/nuget/v/FamFamFam.Flags.Wpf.svg)](https://www.nuget.org/packages/FamFamFam.Flags.Wpf/)\n\n# FamFamFam flag icons for WPF\n\nA simple library for showing flags in WPF.\n\n![Example flag output](flags.png)\n\n## Installation\n\nSource from [NuGet](https://www.nuget.org/packages/FamFamFam.Flags.Wpf/):\n\n\u003e Install-Package FamFamFam.Flags.Wpf\n\n## Usage\n\nThe following code creates an image of flag that corresonds to the [two letter ISO 3166-1 alpha-2 country\ncode](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) that is resolved by the binding expression.\nNote that you may have to include a path in your binding, depending upon the structure of your `DataContext`.\n\n```xaml\n\u003cImage Source=\"{Binding Converter={StaticResource CountryIdToFlagImageSourceConverter}}\"\n       RenderOptions.BitmapScalingMode=\"HighQuality\" /\u003e\n```\n\nThe converter in this binding transforms the country code into an `ImageSource`.\nThis requires an instance of the converter class to be within scope as a resource.\n\nYou might use code such as this somewhere up the logical tree:\n\n```xaml\n\u003cFlags:CountryIdToFlagImageSourceConverter x:Key=\"CountryIdToFlagImageSourceConverter\" /\u003e\n```\n\nYou will also have to declare the `Flags` XML namespace by including this code as an attribute on any ancestor node of the above declaration.\n\n```xaml\nxmlns:Flags=\"clr-namespace:FamFamFam.Flags.Wpf;assembly=FamFamFam.Flags.Wpf\"\n```\n\nIf images appear blurry, set `UseLayoutRounding` to `true` on a parent element, and be sure to use\n`RenderOptions.BitmapScalingMode=\"HighQuality\"` on the `\u003cImage\u003e` itself.\n\nYou could show a `ComboBox` of country flags and names using the following code:\n\n```xaml\n\u003cComboBox ItemsSource=\"{Binding Source={x:Static flags:CountryData.AllCountries}}\"\u003e\n  \u003cComboBox.ItemTemplate\u003e\n    \u003cDataTemplate DataType=\"flags:CountryData\"\u003e\n      \u003cStackPanel Orientation=\"Horizontal\"\u003e\n        \u003cImage Source=\"{Binding Path=Iso2, Converter={StaticResource CountryIdToFlagImageSourceConverter}}\"\n               Stretch=\"None\" Width=\"23\" Height=\"18\" RenderOptions.BitmapScalingMode=\"HighQuality\" /\u003e\n        \u003cTextBlock Text=\"{Binding Path=Name}\" Margin=\"5,0,0,0\" VerticalAlignment=\"Center\" /\u003e\n      \u003c/StackPanel\u003e\n    \u003c/DataTemplate\u003e\n  \u003c/ComboBox.ItemTemplate\u003e\n\u003c/ComboBox\u003e\n```\n\nThe result would resemble:\n\n![Example flag output](combobox.png)\n\n## Coverage\n\nAs noted in `CountryData.cs`:\n\n* FamFamFam Flags includes images for non-ISO 3166-1 entities\n  * `an`\n  * `catalonia`\n  * `cs`\n  * `en`\n  * `eu`\n  * `scotland`\n  * `wales`\n* FamFamFam Flags doesn't cover ISO 3166-1 entities:\n  * `aq` (Antarctica)\n  * `bq` (Bonaire, Sint Eustatius and Saba)\n  * ~`cw` (Curaçao)~\n  * `im` (Isle of Man)\n  * `je` (Jersey)\n  * `bl` (Saint Barthélemy)\n  * `mf` (Saint Martin (French part))\n  * `sx` (Sint Maarten (Dutch part))\n  * `ss` (South Sudan)\n\nThe `cw` (Curaçao) flag was [provided by @serdam55](https://github.com/point-platform/famfamfam-flags-wpf/issues/1).\n\n## Credits\n\nThe flag icons were created by Mark James as the [famfamfam flag icon set](http://www.famfamfam.com/lab/icons/flags/),\nand are available for free use for any purpose with no requirement for attribution.\n\nThis library was created by Drew Noakes in 2009 and was hosted [here](https://www.drewnoakes.com/code/wpf/flags/)\nuntil moved to [GitHub](https://github.com/drewnoakes/famfamfam-flags-wpf) and NuGet in 2017.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoint-platform%2Ffamfamfam-flags-wpf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoint-platform%2Ffamfamfam-flags-wpf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoint-platform%2Ffamfamfam-flags-wpf/lists"}