How to display a PictureBox from behind code in C#
问题 I know my question sounds basic, but i searched all over the place and found nothing.. this is my code : public MainWindow() { InitializeComponent(); Map newMap = new Map(); newMap.setMapStrategy(new SmallMapStrategy()); newMap.createMap(); System.Windows.Forms.PictureBox pictureBox1 = new System.Windows.Forms.PictureBox(); pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(newMap.grid[3].afficher); } this is the afficher function : public override void afficher(object sender,