MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

[WIP] Draggable Dialog

Ouverte
#1,196 4 commentaires 4 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

enhancement
Langage dominant
C#
Étoiles
16.3k
Forks
3.5k
Merge moyen
1 j 22 h
PR mergées (30 j)
8

Description

As I know this is not part of Material Design spec.
But if you like to implement it in web, you have easy possibilities to do this with either React or Angular.

For phones I wouldn't like that feature, as you don't have any space to drag the dialog around, but for desktop applications or even on tablets this feature with a wider screens, makes sense, if you maybe like to see what was behind the dialog and it is somehow also Desktop-Application default/expected behavior for dialogs.

Current implementations

There are two styles, which can be applied to the dialog host.

  1. (default) - this style is based on a Popup (PopupEx) for the dialog.
  2. MaterialDesignEmbeddedDialogHost - this style is based on Grid for the dialog.

Current behavior

The current behavior is, ...

  • that a Card is set as the Grid or Popup content.
  • that the dialog will be shown centered to the dialog host.
  • that the content (DialogHost.DialogContent, DialogHost.DialogContentTemplate etc.) is shown in the Card content.
  • that while resizing/dragging the dialog remains centered.

TBD

default
  • As implemented as a popup the drag could be done anywhere on the screen and is not limited to the dialog host. Should this be allowed or should it be limited?
  • Where should the dialog move on resize or drag of the host window? I think PopupEx has already the right behavior, if the dialog is drawn in the window. But if you drag the popup out of the window boundaries should there still be a repositioning?
MaterialDesignEmbeddedDialogHost
  • The drag here could be realized with margins. In opposite to the default style, this is already bounded to the dialog host content or maybe window content.
  • As working with margins, on resize the dialog could disappear. Here we need to develop a resize/maximize/restore strategy.
both
  • What should happen, if the dialog reopens? Should the last position persist (this would be kind of the default behavior, as the properties of the Grid/Popup would be modified on drag)?
  • Should this feature be opt-in or on by default (this would be a breaking change though)?

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par examiner l’implémentation actuelle des boîtes de dialogue Popup/PopupEx et l’implémentation de MaterialDesignEmbeddedDialogHost. Tranchez les décisions listées concernant les limites, le redimensionnement, la réouverture, la persistance et le comportement d’opt-in avant d’implémenter et de valider des boîtes de dialogue déplaçables pour les deux styles.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
csharp
Domaine
design, desktop
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.