< Window.Resources > < system:String x:Key =β helloString β > Hello </ system:String > </ Window.Resources > < Border DataContext =β{ StaticResource helloString }β > < TextBlock TextContent =β{ Binding }β /> </ Border > * This source code was highlighted with Source Code Highlighter .
< Window.Resources > < system:String x:Key =β helloString β > Hello </ system:String > </ Window.Resources > < Border DataContext =β{ StaticResource helloString }β > < TextBlock TextContent =β{ Binding }β /> </ Border > * This source code was highlighted with Source Code Highlighter .
< Window.Resources > < system:String x:Key =β helloString β > Hello </ system:String > </ Window.Resources > < Border DataContext =β{ StaticResource helloString }β > < TextBlock TextContent =β{ Binding }β /> </ Border > * This source code was highlighted with Source Code Highlighter .
< Window.Resources > < system:String x:Key =β helloString β > Hello </ system:String > </ Window.Resources > < Border DataContext =β{ StaticResource helloString }β > < TextBlock TextContent =β{ Binding }β /> </ Border > * This source code was highlighted with Source Code Highlighter .
< Window.Resources > < system:String x:Key =β helloString β > Hello </ system:String > </ Window.Resources > < Border DataContext =β{ StaticResource helloString }β > < TextBlock TextContent =β{ Binding }β /> </ Border > * This source code was highlighted with Source Code Highlighter .
< Window.Resources > < system:String x:Key =β helloString β > Hello </ system:String > </ Window.Resources > < Border DataContext =β{ StaticResource helloString }β > < TextBlock TextContent =β{ Binding }β /> </ Border > * This source code was highlighted with Source Code Highlighter .
< Window.Resources > < system:String x:Key =β helloString β > Hello </ system:String > </ Window.Resources > < Border DataContext =β{ StaticResource helloString }β > < TextBlock TextContent =β{ Binding }β /> </ Border > * This source code was highlighted with Source Code Highlighter .
< Window.Resources > < system:String x:Key =β helloString β > Hello </ system:String > </ Window.Resources > < Border DataContext =β{ StaticResource helloString }β > < TextBlock TextContent =β{ Binding }β /> </ Border > * This source code was highlighted with Source Code Highlighter .
* This source code was highlighted with Source Code Highlighter .
- < Window.Resources >
- < local: GreekGod Name = β Zeus β Description = β Supreme God of the Olympians β RomanName = β Jupiter β x: Key = β zeus β />
- </ Window.Resources >
- < Border DataContext = β{ StaticResource zeus }β >
- < ContentControl Content = β{ Binding }β />
- </ Border >
* This source code was highlighted with Source Code Highlighter .
- < Window.Resources >
- < local: GreekGod Name = β Zeus β Description = β Supreme God of the Olympians β RomanName = β Jupiter β x: Key = β zeus β />
- < DataTemplate x: Key = β contentTemplate β >
- < DockPanel >
- < TextBlock Foreground = β RoyalBlue β TextContent = β{ Binding Path = Name }β />
- < TextBlock TextContent = β : β Margin = β 0 , 0 , 5 , 0 β³ />
- < TextBlock Foreground = β Silver β TextContent = β{ Binding Path = Description }β />
- </ DockPanel >
- </ DataTemplate >
- </ Window.Resources >
- < Border DataContext = β{ StaticResource zeus }β >
- < ContentControl Content = β{ Binding }β ContentTemplate = β{ StaticResource contentTemplate }β />
- </ Border >
Source: https://habr.com/ru/post/41108/
All Articles