I'm on your side, when times get rough.


[C#, WPF] Display Enumerations in XAML

Filed under: Programming — Peter_KIM @ 14:12
<Page x:Class="Example"
    <ObjectDataProvider x:Key="DockEnum" MethodName="GetValues" ObjectType="{x:Type System:Enum}" >
        <x:Type TypeName="Dock"/>
    <ObjectDataProvider x:Key="VerticalAlignmentEnum" MethodName="GetValues" ObjectType="{x:Type System:Enum}" >
        <x:Type TypeName="VerticalAlignment"/>
      <RowDefinition Height="*" />
      <RowDefinition Height="Auto" />
    <ListBox Grid.Row ="0" ItemsSource="{Binding Source={StaticResource DockEnum}}" />
    <ComboBox Grid.Row ="1" ItemsSource="{Binding Source={StaticResource VerticalAlignmentEnum}}" />



1 Comment »

  1. I feel that is among the so much significant info for me.
    And i’m satisfied studying your article. However
    should statement on some common things, The web site taste is perfect,
    the articles is actually nice : D. Excellent task, cheers

    Comment by this page — 2018.11.24 @ 05:42 | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: