Closed scottcg closed 2 years ago
TextBlock can contain children (inlines), the current helper only allows a single Inline (which is the only option support by the WPF constructor).
The following is an example that isn't currently supported:
<TextBlock><Run Foreground="#FFCFD3DA" Text="Text1" /><Run FontWeight="Normal" Text="Text2" /></TextBlock>
Maybe something like:
public static TextBlock TextBlock(System.Windows.Documents.Inline[] chidren) { var ui = new Windows.Controls.TextBlock(); foreach (var ch in chidren) { ui.Inlines.Add(ch); } return ui; }
Inline support has been improved since this issue was reported; currently the equivalent of above XAML in C# Markup is:
TextBlock( Run("Text1").Foreground("#FFCFD3DA"), Run("Text2").FontWeight("Normal") )
TextBlock can contain children (inlines), the current helper only allows a single Inline (which is the only option support by the WPF constructor).
The following is an example that isn't currently supported:
Maybe something like: