本文整理汇总了C#中System.Windows.Controls.Grid.Log方法的典型用法代码示例。如果您正苦于以下问题:C# Grid.Log方法的具体用法?C# Grid.Log怎么用?C# Grid.Log使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.Grid
的用法示例。
在下文中一共展示了Grid.Log方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page
public Page()
{
InitializeComponent();
Children.Add (Log.Standard);
Canvas.SetZIndex (Log.Standard, 100);
Grid grid = new Grid ();
Border b = new Border ();
b.Background = new SolidColorBrush (Colors.Red);
Border b2 = new Border ();
b2.Background = new SolidColorBrush (Colors.Green);
b2.Width = b2.Height = 50;
b2.CornerRadius = new CornerRadius (50,25,25,25);
grid.Children.Add (b2);
Canvas.SetZIndex (b2, 20);
grid.Children.Add (b);
Canvas.SetTop (b, 50);
Canvas.SetLeft (b, 50);
Image image = new Image ();
image.Source = new BitmapImage (new Uri ("mono.png", UriKind.RelativeOrAbsolute));
image.Width = 25;
image.Height = 25;
b2.Child = image;
var control = new UserBackgroundTest ();
Canvas.SetTop (control, 300);
Children.Add (control);
grid.Width = 100;
grid.Height = 100;
grid.Log (grid.ColumnDefinitions.Count.ToString ());
Children.Add (grid);
grid.Loaded += (sender, args) => {
grid.Log (grid.ColumnDefinitions.Count.ToString ());
};
grid.LayoutUpdated += (sender, args) => {
grid.Log (grid.ColumnDefinitions.Count.ToString ());
image.Log (LayoutInformation.GetLayoutSlot (image).ToString ());
b.Log (LayoutInformation.GetLayoutSlot (b).ToString ());
image.Log (((MatrixTransform)image.RenderTransform).Matrix.ToString ());
b.Log (((MatrixTransform)b.RenderTransform).Matrix.ToString ());
try {
var transform = b.TransformToVisual (image);
b.Log (((MatrixTransform)transform).Matrix.ToString ());
transform = image.TransformToVisual (b);
b.Log (((MatrixTransform)transform).Matrix.ToString ());
}
catch (Exception e) {
b.Log (e.ToString ());
}
};
}