MainWindow.xamlの全コード
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
xmlns:mscorlib="clr-namespace:System.Reflection;assembly=mscorlib" >
<Window.Resources>
<!-- PropertyInfo オブジェクトに適用するデータ テンプレート -->
<DataTemplate DataType="{x:Type mscorlib:PropertyInfo}">
<StackPanel Orientation="Horizontal" Margin="3">
<Border BorderBrush="Black" BorderThickness="2"
CornerRadius="5" Width="20" Height="20"
Background="{Binding Path=Name}" />
<TextBlock Margin="5,0,5,0" Text="{Binding Path=Name}"/>
</StackPanel>
</DataTemplate>
</Window.Resources>
<StackPanel Background="LightPink">
<TextBox Name="textBox1" Margin="5" Text="TEST"/>
<Slider Name="slider1" Margin="5" Minimum="10" Maximum="50" Value="30"/>
<ComboBox Name="comboBox1" Margin="5" Width="150"
MaxDropDownHeight="300"
Loaded="comboBox1_Loaded" />
<TextBlock Name="textBlock1" Margin="5" TextWrapping="Wrap"
Text="{Binding ElementName=textBox1, Path=Text}"
FontSize="{Binding ElementName=slider1, Path=Value}"
Foreground="{Binding ElementName=comboBox1, Path=SelectedValue.Name}" />
</StackPanel>
</Window>
</Ellipse>
</Canvas>
</Window>