1.
.cs
namespace TestApp
{
class TestSource
{
publicstring Test1{ get; set; }
public string Test2{ get; set; }
}
}
public int StringWidth { get; set; }
private void Window_Loaded(object sender, RoutedEventArgs e)
{
this.Width = 840*1.5;
this.Height = 610*1.5;
//GridNormal.Margin = new Thickness(204, 52, 0, 0);
// this.Width =
TextBlock1.DataContext = this;
this.StringWidth = 5;
}
< Windowxmlns:local="using:TestApp" />
<Window.Resources>
<local:TestSource x:Key="TSource" Test1="Test1" Test2="Test2" />
</Window.Resources>