作者:qinqin20082602898705 | 来源:互联网 | 2023-09-23 19:10
本文由编程笔记#小编为大家整理,主要介绍了csharp #xaf #drawing相关的知识,希望对你有一定的参考价值。
public class ViewController1 : ViewController {
protected override void OnViewControlsCreated() {
base.OnViewControlsCreated();
((System.Windows.Forms.Control)View.Control).Paint += new System.Windows.Forms.PaintEventHandler(ViewController1_Paint);
}
void ViewController1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) {
Pen p = new Pen(Color.Red, 5F);
e.Graphics.DrawString("Test String", new Font("Arial", 20F), Brushes.Red, new PointF(50, 50));
}
protected override void OnDeactivated() {
base.OnDeactivated();
((System.Windows.Forms.Control)View.Control).Paint -= new System.Windows.Forms.PaintEventHandler(ViewController1_Paint);
}
}
https://www.devexpress.com/Support/Center/Question/Details/Q353740/mdi-graphics-drawing-in-xaf