Permalink
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (12 sloc) 560 Bytes
<DockPanel xmlns:c="clr-namespace:SDKSample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--<SnippetBackgroundBindingCompact>-->
<DockPanel.Resources>
<c:MyData x:Key="myDataSource"/>
</DockPanel.Resources>
<Button Width="150" Height="30"
Background="{Binding Source={StaticResource myDataSource},
Path=ColorName}">I am bound to be RED!</Button>
<!--</SnippetBackgroundBindingCompact>-->
</DockPanel>