private Size GetPanelSize(Graphics graphics, FlowPanel panel, int width) { if (!_sizes.TryGetValue(panel, out var size)) { size = panel.Measure( new FlowPanelMeasureEventArgs(graphics, width)); _sizes.Add(panel, size); } return(size); }
private Size GetPanelSize(FlowPanel panel) { if (!_sizes.TryGetValue(panel, out var size)) { var graphics = GraphicsUtility.MeasurementGraphics; size = panel.Measure( new FlowPanelMeasureEventArgs(graphics, ClientArea.Width)); _sizes.Add(panel, size); } return(size); }
private Size GetPanelSize(Graphics graphics, FlowPanel panel) { Size size; if (!_sizes.TryGetValue(panel, out size)) { size = panel.Measure( new FlowPanelMeasureEventArgs(graphics, ClientArea.Width)); _sizes.Add(panel, size); } return(size); }