Example #1
0
 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);
 }
Example #2
0
 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);
 }
Example #3
0
        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);
        }