All Projects → point-platform → Famfamfam Flags Wpf

point-platform / Famfamfam Flags Wpf

Licence: apache-2.0
famfamfam flag icons for WPF

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Famfamfam Flags Wpf

Mahapps.metro.iconpacks
Awesome icon packs for WPF and UWP in one library
Stars: ✭ 1,157 (+6705.88%)
Mutual labels:  wpf, icons
Circle Flags
A collection of 300+ minimal circular SVG country flags
Stars: ✭ 139 (+717.65%)
Mutual labels:  flags, icons
Css Flags
A collection of pure CSS flags, all single divs.
Stars: ✭ 90 (+429.41%)
Mutual labels:  flags, icons
Flagkit
Beautiful flag icons for usage in apps and on the web.
Stars: ✭ 2,805 (+16400%)
Mutual labels:  flags, icons
Flagpack Core
Flagpack contains 260+ easily implementable flag icons to use in your design or code project.
Stars: ✭ 127 (+647.06%)
Mutual labels:  flags, icons
react-flagkit
🇺🇦 React wrapper for FlagKit Flag Icons
Stars: ✭ 21 (+23.53%)
Mutual labels:  icons, flags
Font Awesome Swift
Font Awesome swift library for iOS.
Stars: ✭ 743 (+4270.59%)
Mutual labels:  icons
Cryptocoins
Cryptocoins is the most complete vector/webfont icon pack of your favourite cryptocurrencies
Stars: ✭ 810 (+4664.71%)
Mutual labels:  icons
Logos In Pure Css
Company logos created in pure CSS.
Stars: ✭ 735 (+4223.53%)
Mutual labels:  icons
Drawthe.net
drawthe.net draws network diagrams dynamically from a text file describing the placement, layout and icons. Given a yaml file describing the hierarchy of the network and it's connections, a resulting diagram will be created.
Stars: ✭ 729 (+4188.24%)
Mutual labels:  icons
Flaui
UI automation library for .Net
Stars: ✭ 892 (+5147.06%)
Mutual labels:  wpf
Vue Unicons
1000+ Pixel-perfect svg icons for your next project as Vue components
Stars: ✭ 828 (+4770.59%)
Mutual labels:  icons
Csgo Demos Manager
Stars: ✭ 782 (+4500%)
Mutual labels:  wpf
Swifticons
🎢Swift Library for Font Icons - ★ this library
Stars: ✭ 747 (+4294.12%)
Mutual labels:  icons
Twittervideouploader
Upload Short vido to Twitter
Stars: ✭ 5 (-70.59%)
Mutual labels:  wpf
Mpv.net
🎞 mpv.net is a modern media player for Windows that works just like mpv.
Stars: ✭ 737 (+4235.29%)
Mutual labels:  wpf
Badge
Add a badge to your app icon
Stars: ✭ 832 (+4794.12%)
Mutual labels:  icons
Ffmediaelement
FFME: The Advanced WPF MediaElement (based on FFmpeg)
Stars: ✭ 733 (+4211.76%)
Mutual labels:  wpf
Awesome Icons
A curated list of awesome Web Font Icons
Stars: ✭ 758 (+4358.82%)
Mutual labels:  icons
React Share Icons
🔷 Vector share icons as react-components
Stars: ✭ 6 (-64.71%)
Mutual labels:  icons

NuGet version

FamFamFam flag icons for WPF

A simple library for showing flags in WPF.

Example flag output

Installation

Source from NuGet:

Install-Package FamFamFam.Flags.Wpf

Usage

The following code creates an image of flag that corresonds to the two letter ISO 3166-1 alpha-2 country code that is resolved by the binding expression. Note that you may have to include a path in your binding, depending upon the structure of your DataContext.

<Image Source="{Binding Converter={StaticResource CountryIdToFlagImageSourceConverter}}"
       RenderOptions.BitmapScalingMode="HighQuality" />

The converter in this binding transforms the country code into an ImageSource. This requires an instance of the converter class to be within scope as a resource.

You might use code such as this somewhere up the logical tree:

<Flags:CountryIdToFlagImageSourceConverter x:Key="CountryIdToFlagImageSourceConverter" />

You will also have to declare the Flags XML namespace by including this code as an attribute on any ancestor node of the above declaration.

xmlns:Flags="clr-namespace:FamFamFam.Flags.Wpf;assembly=FamFamFam.Flags.Wpf"

If images appear blurry, set UseLayoutRounding to true on a parent element, and be sure to use RenderOptions.BitmapScalingMode="HighQuality" on the <Image> itself.

You could show a ComboBox of country flags and names using the following code:

<ComboBox ItemsSource="{Binding Source={x:Static flags:CountryData.AllCountries}}">
  <ComboBox.ItemTemplate>
    <DataTemplate DataType="flags:CountryData">
      <StackPanel Orientation="Horizontal">
        <Image Source="{Binding Path=Iso2, Converter={StaticResource CountryIdToFlagImageSourceConverter}}"
               Stretch="None" Width="23" Height="18" RenderOptions.BitmapScalingMode="HighQuality" />
        <TextBlock Text="{Binding Path=Name}" Margin="5,0,0,0" VerticalAlignment="Center" />
      </StackPanel>
    </DataTemplate>
  </ComboBox.ItemTemplate>
</ComboBox>

The result would resemble:

Example flag output

Coverage

As noted in CountryData.cs:

  • FamFamFam Flags includes images for non-ISO 3166-1 entities
    • an
    • catalonia
    • cs
    • en
    • eu
    • scotland
    • wales
  • FamFamFam Flags doesn't cover ISO 3166-1 entities:
    • aq (Antarctica)
    • bq (Bonaire, Sint Eustatius and Saba)
    • cw (Curaçao)
    • im (Isle of Man)
    • je (Jersey)
    • bl (Saint Barthélemy)
    • mf (Saint Martin (French part))
    • sx (Sint Maarten (Dutch part))
    • ss (South Sudan)

The cw (Curaçao) flag was provided by @serdam55.

Credits

The flag icons were created by Mark James as the famfamfam flag icon set, and are available for free use for any purpose with no requirement for attribution.

This library was created by Drew Noakes in 2009 and was hosted here until moved to GitHub and NuGet in 2017.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].