|
namespace TestSimpleControls
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// Stellt für den ObjectProvider im XAML die ComboBoxItems zur Verfuegung
/// </summary>
public static class Collections
{
public enum Anrede
{
UnknownTitle = 0,
Mr = 1,
Mrs = 2,
Ms = 3,
MrAndMrs = 4,
Company = 5
}
/// <summary>
/// Load combo box content via Object DataProvider based on static method as DataSource
/// (see XAML of window for mor details).
///
/// Source: http://www.biggle.de/blog/combobox-an-objectprovider-binden
/// </summary>
/// <returns></returns>
public static Dictionary<Anrede, string> GetFormOfAddress()
{
Dictionary<Anrede, string> choices = new Dictionary<Anrede, string>();
choices.Add(Anrede.UnknownTitle, "Without Title");
choices.Add(Anrede.Mr, "Mr");
choices.Add(Anrede.Mrs, "Mrs");
choices.Add(Anrede.Ms, "Ms");
choices.Add(Anrede.MrAndMrs, "Mr and Mrs");
choices.Add(Anrede.Company, "Company");
return choices;
}
}
}
|
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.
The Windows Presentation Foundation (WPF) and C# are among my favorites and so I developed
Edi
and a few other projects on
GitHub. I am normally an algorithms and structure type but WPF has such interesting UI sides that I cannot help myself but get into it.
https://de.linkedin.com/in/dirkbahle