Пример #1
0
        protected void OnGridSizeChanged(EventArgs args)
        {
            GridSizeChanged?.Invoke(this, args);

            this.cellWidth  = width / colsAmount;
            this.cellHeight = height / rowsAmount;

            bitmap?.Dispose();
            bitmap = new Bitmap(width, height);
            graphics?.Dispose();
            graphics = Graphics.FromImage(bitmap);
        }
Пример #2
0
 /// <summary>
 /// Raises the <see cref="GridSizeChanged"/> event.
 /// </summary>
 /// <param name="e">
 /// An <see cref="EventArgs"/> that contains the event data.
 /// </param>
 protected virtual void OnGridSizeChanged(EventArgs e)
 {
     GridSizeChanged?.Invoke(this, e);
 }
Пример #3
0
 internal void RaiseGridSizeChanged()
 {
     Frame = new CGRect(0, 0, Width, Height);
     GridSizeChanged?.Invoke(IntrinsicContentSize);
 }