Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
        }