<
x:Array
x:Key
=
"stringArray"
Type
"sys:String"
xmlns:x
"http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys
"clr-namespace:System;assembly=mscorlib"
>
sys:String
>Bear</
>Bird</
>Cat</
>Cow</
>Dog</
>Elephant</
>Fish</
>Goat</
>Hamster</
>Horse</
>Insect</
>Sheep</
>Snake</
>Monkey</
</
"intArray"
"sys:Int32"
sys:Int32
>0</
>1</
>2</
>3</
>4</
>5</
>6</
>7</
>8</
>9</
"personArray"
"local:Person"
xmlns:local
"clr-namespace:StaticDummyData.PocoModel"
local:Person
local:Person.FirstName
>Jack</
local:Person.LastName
>Jones</
local:Person.Age
>42</
local:Person.JoinDate
>12/10/11</
>Jill</
>Johnson</
>31</
>10/09/08</
>Tom</
>26</
>08/02/12</
using
System;
namespace
StaticDummyData.PocoModel
{
public
class
Person
string
FirstName {
get
;
set
; }
LastName {
int
Age {
DateTime JoinDate {
}
System.ComponentModel;
StaticDummyData.MvvmModel
Person : INotifyPropertyChanged
_FirstName;
FirstName
return
if
(_FirstName != value)
_FirstName = value;
RaisePropertyChanged(
"FirstName"
);
_LastName;
LastName
(_LastName != value)
_LastName = value;
"LastName"
_Age;
Age
(_Age != value)
_Age = value;
"Age"
DateTime _JoinDate;
DateTime JoinDate
_JoinDate;
(_JoinDate != value)
_JoinDate = value;
"JoinDate"
void
prop)
(PropertyChanged !=
null
) { PropertyChanged(
this
,
new
PropertyChangedEventArgs(prop)); }
event
PropertyChangedEventHandler PropertyChanged;
Window
x:Class
"StaticDummyData.MainWindow"
xmlns
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Title
"MainWindow"
Height
"350"
Width
"525"
StackPanel
ComboBox
ItemsSource
"{StaticResource stringArray}"
/>
"{StaticResource intArray}"
DataGrid
"{StaticResource personArray}"
Window.Resources
"{DynamicResource stringArray}"
ComboBox.Resources
Zoltán Horváth edited Revision 8. Comment: correcting typo
XAML guy edited Revision 7. Comment: added link to copyable version
XAML guy edited Revision 6. Comment: tweak
XAML guy edited Revision 5. Comment: tweaks & counter
XAML guy edited Revision 4. Comment: layout
XAML guy edited Revision 3. Comment: added more tags