Click here to Skip to main content
15,896,410 members
Articles / Desktop Programming / WPF

WPF Country Combobox

Rate me:
Please Sign up or sign in to vote.
4.62/5 (7 votes)
16 Apr 2011CPOL2 min read 65.2K   3.7K   16  
This article will help you to create a country dropdown with the help of WPF concepts like WPF converters
  • Customcontrols.zip
    • Customcontrols
      • Customcontrols.sln
      • Customcontrols.suo
      • Customcontrols
        • App.xaml
        • App.xaml.cs
        • bin
          • Debug
            • Customcontrols.exe
            • Customcontrols.vshost.exe
            • Images
              • Countries
                • .DS_Store
                • ad.png
                • ae.png
                • af.png
                • ag.png
                • ai.png
                • al.png
                • am.png
                • an.png
                • ao.png
                • ar.png
                • as.png
                • at.png
                • au.png
                • aw.png
                • ax.png
                • az.png
                • ba.png
                • bb.png
                • bd.png
                • be.png
                • bf.png
                • bg.png
                • bh.png
                • bi.png
                • bj.png
                • bm.png
                • bn.png
                • bo.png
                • br.png
                • bs.png
                • bt.png
                • bv.png
                • bw.png
                • by.png
                • bz.png
                • ca.png
                • catalonia.png
                • cc.png
                • cd.png
                • cf.png
                • cg.png
                • ch.png
                • ci.png
                • ck.png
                • cl.png
                • cm.png
                • cn.png
                • co.png
                • cr.png
                • cs.png
                • cu.png
                • cv.png
                • cx.png
                • cy.png
                • cz.png
                • de.png
                • dj.png
                • dk.png
                • dm.png
                • do.png
                • dz.png
                • ec.png
                • ee.png
                • eg.png
                • eh.png
                • england.png
                • er.png
                • es.png
                • et.png
                • europeanunion.png
                • fam.png
                • fi.png
                • fj.png
                • fk.png
                • fm.png
                • fo.png
                • fr.png
                • ga.png
                • gb.png
                • gd.png
                • ge.png
                • gf.png
                • gh.png
                • gi.png
                • gl.png
                • gm.png
                • gn.png
                • gp.png
                • gq.png
                • gr.png
                • gs.png
                • gt.png
                • gu.png
                • gw.png
                • gy.png
                • hk.png
                • hm.png
                • hn.png
                • hr.png
                • ht.png
                • hu.png
                • id.png
                • ie.png
                • il.png
                • in.png
                • io.png
                • iq.png
                • ir.png
                • is.png
                • it.png
                • jm.png
                • jo.png
                • jp.png
                • ke.png
                • kg.png
                • kh.png
                • ki.png
                • km.png
                • kn.png
                • kp.png
                • kr.png
                • kw.png
                • ky.png
                • kz.png
                • la.png
                • lb.png
                • lc.png
                • li.png
                • lk.png
                • lr.png
                • ls.png
                • lt.png
                • lu.png
                • lv.png
                • ly.png
                • ma.png
                • mc.png
                • md.png
                • me.png
                • mg.png
                • mh.png
                • mk.png
                • ml.png
                • mm.png
                • mn.png
                • mo.png
                • mp.png
                • mq.png
                • mr.png
                • ms.png
                • mt.png
                • mu.png
                • mv.png
                • mw.png
                • mx.png
                • my.png
                • mz.png
                • na.png
                • nc.png
                • ne.png
                • nf.png
                • ng.png
                • ni.png
                • nl.png
                • no.png
                • np.png
                • nr.png
                • nu.png
                • nz.png
                • om.png
                • pa.png
                • pe.png
                • pf.png
                • pg.png
                • ph.png
                • pk.png
                • pl.png
                • pm.png
                • pn.png
                • pr.png
                • ps.png
                • pt.png
                • pw.png
                • py.png
                • qa.png
                • re.png
                • ro.png
                • rs.png
                • ru.png
                • rw.png
                • sa.png
                • sb.png
                • sc.png
                • scotland.png
                • sd.png
                • se.png
                • sg.png
                • sh.png
                • si.png
                • sj.png
                • sk.png
                • sl.png
                • sm.png
                • sn.png
                • so.png
                • sr.png
                • st.png
                • sv.png
                • sy.png
                • sz.png
                • tc.png
                • td.png
                • tf.png
                • tg.png
                • th.png
                • tj.png
                • tk.png
                • tl.png
                • tm.png
                • tn.png
                • to.png
                • tr.png
                • tt.png
                • tv.png
                • tw.png
                • tz.png
                • ua.png
                • ug.png
                • um.png
                • us.png
                • uy.png
                • uz.png
                • va.png
                • vc.png
                • ve.png
                • vg.png
                • vi.png
                • vn.png
                • vu.png
                • wales.png
                • wf.png
                • ws.png
                • ye.png
                • yt.png
                • za.png
                • zm.png
                • zw.png
            • XML
          • Release
        • Converter
        • CountryDropdown.xaml
        • CountryDropdown.xaml.cs
        • Customcontrols.csproj
        • MainWindow.xaml
        • MainWindow.xaml.cs
        • Properties
<Window x:Class="Customcontrols.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="300" Width="600" Name="cc"
        xmlns:local="clr-namespace:Customcontrols">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <local:CountryDropdown  x:Name="ucCountryDropdown" Grid.Row="0"></local:CountryDropdown>
        <!--<StackPanel Grid.Row="1"  Orientation="Horizontal">
            <TextBlock FontWeight="ExtraBlack"  Text="You selected" Height="20" Width="91"></TextBlock><TextBlock Width="100" Height="100" Background="{Binding ElementName=superCombo, Path=SelectedColor}" ></TextBlock>
        </StackPanel>-->
        
    </Grid>
</Window>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) NeST
India India
Professional: Have 5 years experience in ASP.Net,C#.Net,MVC,WPF,,Entity Framework,WCF,LINQ,JQuery,JQuery Mobile,MS SQL,Oracle,Silverlight,MS CRM,Dynamics GP

Academics : BTech in Computer Science and Engineering from Mar Athanasius College of Engineering,Kothamangalam,Kerala .

Location : Kothamangalam, Ernakulam ,Kerala ,India
Presently working at Technopark Trivandrum,
Mob: 8281065563

Comments and Discussions