A simple, but not incredibly scalable way to handle this:
<Window x:Class="AdHocWPF.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:System="clr-namespace:System;assembly=mscorlib" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <System:String x:Key="String2">String2</System:String> </Window.Resources> <Grid> <Button> <TextBlock> <System:String>String1 </System:String> <TextBlock Text="{DynamicResource String2}"/> </TextBlock> </Button> </Grid> </Window>
TextBlocks are mostly small streaming documents, so they are very flexible.
Whyaduck
source share