Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stop large popups, i.e date and time pickers getting truncated on low…
… res screens if the control is in the middle of the screen and not enough space above or below
- Loading branch information
1 parent
645ca28
commit 99875b9
Showing
5 changed files
with
37 additions
and
10 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
MaterialDesignThemes.Wpf/CustomPopupPlacementCallbackHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls.Primitives; | ||
|
||
namespace MaterialDesignThemes.Wpf | ||
{ | ||
public static class CustomPopupPlacementCallbackHelper | ||
{ | ||
public static readonly CustomPopupPlacementCallback LargePopupCallback; | ||
|
||
static CustomPopupPlacementCallbackHelper() | ||
{ | ||
LargePopupCallback = | ||
(size, targetSize, offset) => new[] {new CustomPopupPlacement(new Point(), PopupPrimaryAxis.Horizontal)}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters