MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

[WIP] Draggable Dialog

オープン
#1,196 コメント 4 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

enhancement
主要言語
C#
スター
16.3k
フォーク
3.5k
平均マージ
1日 22時間
マージ済み PR(30日)
8

説明

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](https://material-ui.com/demos/dialogs/#draggable-dialog) or [Angular](https://stackoverflow.com/a/49706221/3924697).

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)?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、現在のPopup/PopupExダイアログの実装とMaterialDesignEmbeddedDialogHostの実装を確認します。両方のスタイルでドラッグ可能なダイアログを実装して検証する前に、境界、サイズ変更、再オープン、永続化、オプトイン動作に関して列挙されている事項を決定してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
design, desktop
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。