わかりにくいなぁ・・・
MSDN ListView
http://msdn.microsoft.com/ja-jp/library/ms743602(VS.80).aspx
<Window x:Class="WpfApplication2.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:WpfApplication1" <<<<<< ここで、src = ネームスペース
Title="Window1" Height="300" Width="300" >
<Canvas>
<Canvas.Resources>
<ObjectDataProvider x:Key="Colors" ObjectType="{x:Type src:myColors}"/> <<<< ここでタイプを指定
</Canvas.Resources>
<ListBox Name="myListBox" HorizontalAlignment="Left" SelectionMode="Extended"
Width="265" Height="117"
ItemsSource="{Binding Source={StaticResource Colors}}" IsSynchronizedWithCurrentItem="true">
</ListBox>
</Canvas>
</Window>
/////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
namespace WpfApplication1
{
public class myColors : ObservableCollection<string>
{
public myColors()
{
Add("LightBlue");
Add("Pink");
Add("Red");
Add("Purple");
Add("Blue");
Add("Green");
}
}
}