【发布时间】:2013-08-28 09:24:43
【问题描述】:
我的应用中有几个 html 文件。我通过 webBrowser 显示它。我将当前显示页面的编号存储为string Page。我想在文本块中显示该页面名称。因此,我将这些文本存储为字符串。例如
string chapter1 = "Welcome page";
string chapter2 = "About us";
//...// 100 strings
如果在浏览器中显示欢迎页面,string page 将是 1。使用 string page string chapter1 应该是 fileName.Text 同样我想显示。但是,我不知道该怎么做。最好的答案将不胜感激。
C#代码;
TextBlock fileName = new TextBlock();
fileName.Margin = new Thickness(0);
fileName.FontSize = 30;
fileName.Foreground = new SolidColorBrush(Colors.White);
fileName.TextAlignment = TextAlignment.Center;
fileName.Text = "???";
【问题讨论】:
-
如果你使用的是html,你怎么把它标记为c#?
-
我通过 webBrowser 显示 html 内容
标签: c# xaml windows-phone-8