Repository navigation
ContentDialog fixes - #4352
ContentDialog fixes#4352
Conversation
…ontentDialog features
…t off Add an internal adjusted visible bounds which trims the status bar from the height. This allows the ContentDialog to be arranged with the correct available height. There's a case for adjusting the public-facing VisibleBounds property, but it's not clear what the exact adjustment would be and it's potentially a breaking change, and isn't required for the present case.
|
The build 20948 found UI Test snapshots differences: Details
|
| <!--<Ellipse Fill="Maroon" | ||
| Height="160" | ||
| Width="110" | ||
| HorizontalAlignment="Center" />--> |
| /// on Android when it's opaque, on the grounds that the root managed view is already arranged below the status bar in y-direction by | ||
| /// default (unlike iOS), but in some cases the correct total height is needed, hence this property. | ||
| /// </summary> | ||
| internal Rect TrueVisibleBounds => |
There was a problem hiding this comment.
Should this be named NativeVisibleBounds ?
There was a problem hiding this comment.
I debated the name with myself and didn't find a good one... it's not really 'native' though.
I suspect that the public VisibleBounds property should really be returning this value, but I wasn't sure enough to make the breaking change, and anyway it was out of scope for this PR. (It would require adjusting VisibleBoundsPadding obviously and potentially the Duo dual-screen control as well.)
There was a problem hiding this comment.
It's internal, so not a big deal :)
|
The build 20948 found UI Test snapshots differences: Details
|
| PlacementMode m_placementMode = PlacementMode.Undetermined; | ||
| bool m_hideInProgress = false; | ||
| bool m_hasPreparedContent = false; | ||
| bool m_isShowing = false; |
There was a problem hiding this comment.
Codacy found an issue: Make 'm_isShowing' 'readonly'.
| InPlace | ||
| }; | ||
|
|
||
| PlacementMode m_placementMode = PlacementMode.Undetermined; |
There was a problem hiding this comment.
Codacy found an issue: Make 'm_placementMode' 'readonly'.
| { | ||
| // Uno TODO: understand when this is applicable (seemingly while dialog is open?) | ||
| //if (HasValidAppliedTemplate() && m_tpCurrentAsyncOperation && m_hasPreparedContent) | ||
| //{ |
There was a problem hiding this comment.
Codacy found an issue: Remove this commented out code.
|
|
||
| // Uno TODO (for now this would have to be applied in-app using ElevatedView from Uno.UI.Toolkit) | ||
| //// Cast a shadow | ||
| //(ApplyElevationEffect(m_tpBackgroundElementPart.AsOrNull<UIElement>())); |
There was a problem hiding this comment.
Codacy found an issue: Remove this commented out code.
| bool m_isShowing = false; | ||
| Storyboard? m_layoutAdjustmentsForInputPaneStoryboard; | ||
|
|
||
| double m_dialogMinHeight = 0; |
There was a problem hiding this comment.
Codacy found an issue: Make 'm_dialogMinHeight' 'readonly'.
| if (defaultButton != ContentDialogButton.None) | ||
| { | ||
| // UNO TODO | ||
| //ctl::ComPtr<DependencyObject> focusedElement; |
There was a problem hiding this comment.
Codacy found an issue: Remove this commented out code.
| var height = element.ActualHeight; | ||
|
|
||
| return transform.TransformBounds(new Rect(0, 0, width, height)); | ||
| }; |
There was a problem hiding this comment.
Codacy found an issue: Remove this empty statement.
| } | ||
|
|
||
| // On PhoneBlue, the dialog did not move out of the way of the input pane. | ||
| if (true) |
There was a problem hiding this comment.
Codacy found an issue: Remove this useless 'if' statement.
| }; | ||
|
|
||
| PlacementMode m_placementMode = PlacementMode.Undetermined; | ||
| bool m_hideInProgress = false; |
There was a problem hiding this comment.
Codacy found an issue: Make 'm_hideInProgress' 'readonly'.
|
|
||
| var flowDirection = FlowDirection; | ||
|
|
||
| FrameworkElement spBackgroundAsFE = m_tpBackgroundElementPart; |
There was a problem hiding this comment.
Codacy found an issue: Remove the unused local variable 'spBackgroundAsFE'.
|
|
||
| //[this](IInspectable *, xaml::IRoutedEventArgs *) | ||
|
|
||
| //{ |
There was a problem hiding this comment.
Codacy found an issue: Remove this commented out code.
|
The build 21002 found UI Test snapshots differences: Details
|
|
The build 21002 found UI Test snapshots differences: Details
|
GitHub Issue (If applicable): resolves #1299
Adds support to ContentDialog for FullSizeDesired, more visual states, and various other bugfixes
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Internal Issue (If applicable):