本文整理汇总了C#中System.Windows.Controls.StackPanel.Log方法的典型用法代码示例。如果您正苦于以下问题:C# StackPanel.Log方法的具体用法?C# StackPanel.Log怎么用?C# StackPanel.Log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.StackPanel
的用法示例。
在下文中一共展示了StackPanel.Log方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page
public Page()
{
InitializeComponent();
Children.Add (Log.Standard);
Canvas.SetZIndex (Log.Standard, 100);
Border b = new Border ();
var stack = new StackPanel ();
stack.Children.Add (CreateColoredBorder (Colors.Red));
stack.Children.Add (CreateColoredBorder (Colors.Blue));
stack.Children.Add (CreateColoredBorder (Colors.Green));
stack.HorizontalAlignment = HorizontalAlignment.Right;
b.Width = 50;
b.Background = new SolidColorBrush (Colors.Yellow);
stack.Width = 50;
stack.Height = 30;
b.Child = stack;
Children.Add (b);
stack.Loaded += (sender, args) => {
stack.Log ("loaded");
};
stack.SizeChanged += (sender, args) => {
FrameworkElement fe = (FrameworkElement)stack.Children[0];
Rect slot = LayoutInformation.GetLayoutSlot (fe);
stack.Log ("child 0 slot = " + slot.ToString ());
stack.Log ("updated");
fe.Height = 5;
fe.Log ("DesiredSize = " + fe.DesiredSize.ToString ());
fe.SizeChanged += (sender1, args1) => {
fe.Log ("child 0 slot = " + LayoutInformation.GetLayoutSlot ((FrameworkElement)sender1));
fe.Log ("DesiredSize = " + fe.DesiredSize.ToString ());
fe.Log ("updated");
};
};
}