我有一个noob问题= P我怎样才能以编程方式将画布添加到网格中?我用的时候
Canvas _canvas = new Canvas( )
{
Name = "newCanvas",
Visibility = System.Windows.Visibility.Visible,
Margin = new Thickness( 100, 0, 0, 100 ),
Width = 100000,
Height = 100000,
Background = new SolidColorBrush { Color = new Color { R = 255, G = 255, B = 255, A = 1 } }
};
Run Code Online (Sandbox Code Playgroud)
然后说 LayoutRoot.Children.Add( _canvas );
什么都没发生.我该怎么办?
| 归档时间: |
|
| 查看次数: |
641 次 |
| 最近记录: |