void HandleSizeChanged(object sender, EventArgs e) { var target = Control as sd.WindowRenderTarget; if (target == null) { return; } try { target.Resize(drawable.ClientSize.ToDx()); drawable.Invalidate(); } catch (Exception ex) { Debug.Print(string.Format("Could not resize: {0}", ex)); } }
void HandleSizeChanged(object sender, EventArgs e) { #if WINFORMS var target = Control as sd.WindowRenderTarget; if (target == null) { return; } try { target.Resize(drawable.ClientSize.ToDx()); drawable.Invalidate(); } catch (Exception ex) { Debug.WriteLine(string.Format("Could not resize: {0}", ex)); } #else throw new NotImplementedException(); #endif }