Plus Edition. Incorrect window position restoration after returning from the maximized state.

Aperta
#1,804 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
desktop

Direzione di ricerca

Start in Child_MaximizedChanged and compare the supplied current and corrected code paths. Reproduce the child-window sequence by moving it, maximizing it, and restoring it; done means the prior Left and Top are restored while the window remains restricted to the valid container area.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Sequence of actions:

  1. Child window. Left > 0 and Top > 0.
  2. Maximize the window to full screen.
  3. Restore the window position to the previous state.
    Left = 0 and Top = 0. That is, the previous position is not restored.

Source code:

        private void Child_MaximizedChanged(object sender, EventArgs e) {
		...
                WindowContainerChildData initialData = (WindowContainerChildData)windowControl.InitialData;
                windowControl.Left = initialData.Left;
                windowControl.Top = initialData.Top;
                windowControl.Width = initialData.Width;
                windowControl.Height = initialData.Height;
                windowControl.UpdateLayout();
                windowControl.Left = this.GetRestrictedLeft(windowControl);
                windowControl.Top = this.GetRestrictedTop(windowControl);
            }
        }

Corrected code:

        private void Child_MaximizedChanged(object sender, EventArgs e) {
		...
                WindowContainerChildData initialData = (WindowContainerChildData)windowControl.InitialData;
                windowControl.Width = initialData.Width;
                windowControl.Height = initialData.Height;
                windowControl.UpdateLayout();
                windowControl.Left = initialData.Left;
                windowControl.Top = initialData.Top;
                windowControl.Left = this.GetRestrictedLeft(windowControl);
                windowControl.Top = this.GetRestrictedTop(windowControl);
            }
        }

Lingua principale
C#
Stelle
4.2k
Fork
912
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di xceedsoftware/wpftoolkit

Tutte le issue di xceedsoftware/wpftoolkit

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.