public void SetLayout(IObjectLayout layout) { if (!(layout is LinearLayout)) { return; } if (linearLayout == layout as ObjectLinearLayout) { return; } linearLayout = layout as ObjectLinearLayout; // CellPadding cellPaddingW.Text = linearLayout.CellPadding.Width.ToString(); cellPaddingH.Text = linearLayout.CellPadding.Height.ToString(); linearLayout.CellPaddingChanged += (object sender, CellPaddingChangedEventArgs args) => { cellPaddingW.Text = args.CellPadding.Width.ToString(); cellPaddingH.Text = args.CellPadding.Height.ToString(); linearLayout.RequestLayout(); }; linearLayout.RequestLayout(); }
public void SetLayout(IObjectLayout layout) { if (!(layout is LinearLayout)) { return; } if (linearLayout == layout as ObjectLinearLayout) { return; } linearLayout = layout as ObjectLinearLayout; // VerticalAlignment if (linearLayout.VerticalAlignment == VerticalAlignment.Top) { vAlignTop.IsSelected = true; } else if (linearLayout.VerticalAlignment == VerticalAlignment.Center) { vAlignCenter.IsSelected = true; } else { vAlignBottom.IsSelected = true; } linearLayout.VerticalAlignmentChanged += (object sender, VerticalAlignmentChangedEventArgs args) => { if (args.VerticalAlignment == VerticalAlignment.Top) { vAlignTop.IsSelected = true; } else if (args.VerticalAlignment == VerticalAlignment.Center) { vAlignCenter.IsSelected = true; } else { vAlignBottom.IsSelected = true; } linearLayout.RequestLayout(); }; linearLayout.RequestLayout(); }
public void SetLayout(IObjectLayout layout) { if (!(layout is LinearLayout)) { return; } if (linearLayout == layout as ObjectLinearLayout) { return; } linearLayout = layout as ObjectLinearLayout; // HorizontalAlignment if (linearLayout.HorizontalAlignment == HorizontalAlignment.Begin) { hAlignBegin.IsSelected = true; } else if (linearLayout.HorizontalAlignment == HorizontalAlignment.Center) { hAlignCenter.IsSelected = true; } else { hAlignEnd.IsSelected = true; } linearLayout.HorizontalAlignmentChanged += (object sender, HorizontalAlignmentChangedEventArgs args) => { if (args.HorizontalAlignment == HorizontalAlignment.Begin) { hAlignBegin.IsSelected = true; } else if (args.HorizontalAlignment == HorizontalAlignment.Center) { hAlignCenter.IsSelected = true; } else { hAlignEnd.IsSelected = true; } linearLayout.RequestLayout(); }; linearLayout.RequestLayout(); }
public void SetLayout(IObjectLayout layout) { if (!(layout is LinearLayout)) { return; } if (linearLayout == layout as ObjectLinearLayout) { return; } linearLayout = layout as ObjectLinearLayout; // LinearOrientation if (linearLayout.LinearOrientation == LinearLayout.Orientation.Horizontal) { linearOrientH.IsSelected = true; } else { linearOrientV.IsSelected = true; } linearLayout.LinearOrientationChanged += (object sender, LinearOrientationChangedEventArgs args) => { if (args.LinearOrientation == LinearLayout.Orientation.Horizontal) { linearOrientH.IsSelected = true; } else { linearOrientV.IsSelected = true; } linearLayout.RequestLayout(); }; linearLayout.RequestLayout(); }