void Pack(Widget widget, bool?expand, WidgetPlacement align, PackOrigin ptype) { if (expand.HasValue) { if (direction == Orientation.Vertical) { widget.ExpandVertical = expand.Value; } else { widget.ExpandHorizontal = expand.Value; } } if (align != default(WidgetPlacement)) { if (direction == Orientation.Vertical) { widget.VerticalPlacement = align; } else { widget.HorizontalPlacement = align; } } if (widget == null) { throw new ArgumentNullException("widget"); } var p = new BoxPlacement((WidgetBackendHost)BackendHost, widget); p.PackOrigin = ptype; children.Add(p); }
internal protected virtual void OnReplaceChild(BoxPlacement placement, Widget oldWidget, Widget newWidget) { if (oldWidget != null) { OnRemove(oldWidget); } OnAdd(newWidget, placement); }
void Pack(Widget widget, BoxMode mode, int padding, PackOrigin ptype) { var p = new BoxPlacement((WidgetBackendHost)BackendHost, widget); p.BoxMode = mode; p.Padding = padding; p.PackOrigin = ptype; children.Add(p); }
void Pack(Widget widget, BoxMode mode, int padding, PackOrigin ptype) { var p = new BoxPlacement((EventSink)WidgetEventSink, widget); p.BoxMode = mode; p.Padding = padding; p.PackOrigin = ptype; children.Add(p); }
void Pack(Widget widget, BoxMode mode, double padding, PackOrigin ptype) { if (widget == null) { throw new ArgumentNullException("widget"); } if (padding < 0) { throw new ArgumentException("padding can't be negative"); } var p = new BoxPlacement((WidgetBackendHost)BackendHost, widget); p.BoxMode = mode; p.Padding = padding; p.PackOrigin = ptype; children.Add(p); }
void OnChildChanged(BoxPlacement placement, object hint) { OnPreferredSizeChanged(); }
void OnAdd(Widget child, BoxPlacement placement) { RegisterChild(child); Backend.Add((IWidgetBackend)GetBackend(child)); OnPreferredSizeChanged(); }