Code Monkey home page Code Monkey logo

countryflag's Introduction

NOTE!

This library is no longer being maintained. Use the updated version which works with .NET Core and has more and up-to-date flags.

CountryFlag

Flags screenshot

CountryFlag is a WPF user control for displaying the flag of any one of the 249 countries and territories assigned with an ISO 3166-1 alpha-2 code.

Requirements

  • .NET Framework 4.6

Usage

Install the CountryFlag NuGet package by running the following command in the NuGet Package Manager Console,

Install-Package CountryFlag -Version 2.1.0

After installation is complete add a XAML reference to the assembly and proceed to use the control.

<Window ...
        xmlns:cf="clr-namespace:CountryFlag;assembly=CountryFlag">       
    <WrapPanel>
        <cf:CountryFlag Code="BT" Margin="5"/>
        <cf:CountryFlag Code="AF" Margin="5"/>
        <cf:CountryFlag Code="AO" Margin="5"/>
        <cf:CountryFlag Code="BB" Margin="5"/>
        <cf:CountryFlag Code="KE" Margin="5"/>
        <cf:CountryFlag Code="BR" Margin="5"/>
        <cf:CountryFlag Code="EG" Margin="5"/>
        <cf:CountryFlag Code="RS" Margin="5"/>
        <cf:CountryFlag Code="SZ" Margin="5"/>
    </WrapPanel>    
</Window>

You specify which flag you want the control to display by the setting the Code property, which you set with an ISO 3166-1 alpha-2 code.

countryflag's People

Contributors

meshackmusundi avatar

Stargazers

 avatar Alejandro Jiménez Encinas avatar Alexander Hübert avatar  avatar Dereck DANIEL avatar AngkorW avatar

Watchers

 avatar

countryflag's Issues

Problem with image stretching

Hi, I have come accross an issue when trying to size flag into combobox or some other type of precisely given component, when width and height must be fixed.
To fix this issue I propose adding stretch to component setters and remove some basic width, height predefinition.
Including modified code.
CountryFlag-ProposedChanges.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.