Bonsoir à tous,
je cherche un moyen de mettre un contrôle en plein écran, j'ai fais le code suivant. Mais dans App.Run j'ai l'exception suivante :
Déconnexion obligatoire de l'enfant spécifié du Visual parent actuel avant de procéder à l'attachement d'un nouveau Visual parent.
Code C# : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 public void FullScreen(Object Control) { this.WindowState = System.Windows.WindowState.Maximized; this.WindowStyle = System.Windows.WindowStyle.None; this.Temp = this.Content; try { //this.RemoveVisualChild((Visual)this.Content); this.Content = Control; } catch { } } public void Normal() { try { this.Content = this.Temp; this.Temp = null; } catch { } this.WindowStyle = System.Windows.WindowStyle.SingleBorderWindow; this.WindowState = System.Windows.WindowState.Normal; }
Quelqu'un a t'il une idée de la marche qu'il faut suivre ?
J'ai pensé créer un nouvelle fenêtre (TopMost = true) mais je trouve pas ça super propre.
Merci d'avance
Partager