Project build target: Windows 10 Fall Creators Update (introduced v10.0.16299.0)
.
I am dynamically adding TextBlock-s:
TextBlock headName = new TextBlock();
headName.Text = h3.OuterHtml;
headName.IsTextSelectionEnabled = true;
headName.Style = (Style)Application.Current.Resources["TitleTextBlockStyle"];
GridView.Children.Add(headName);
//...
foreach (HtmlNode p in ps)
{
TextBlock pTag = new TextBlock();
pTag.Text = p.InnerText;
pTag.IsTextSelectionEnabled = true;
pTag.FontSize = 16;
pTag.TextWrapping = TextWrapping.Wrap;
GridView.Children.Add(pTag);
}
Into xaml Grid
:
<Grid x:Name="GridView"
Loaded="GridView_Loaded"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
</Grid>