The ShouldConstrainToRootBounds property of the Popup doesn't work
See original GitHub issueDescribe the bug
How can I show a popup out of the window’s bounds? The ShouldConstrainToRootBounds
looks pretty good (doc) but doesn’t work and the IsConstrainedToRootBounds
property always returns true
Steps to reproduce the bug
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="Click" Click="Button_Click"/>
<Popup x:Name="popup" ShouldConstrainToRootBounds="False">
<Border Width="100" Height="500" Background="Red" BorderThickness="3" BorderBrush="Black"/>
</Popup>
</StackPanel>
public sealed partial class MainWindow : Window {
public MainWindow() {
this.InitializeComponent();
}
void Button_Click(object sender, RoutedEventArgs e) {
popup.IsOpen = !popup.IsOpen;
}
}
Expected behavior
Screenshots
Version Info
NuGet package version:
Windows app type:
UWP | Win32 |
---|---|
Yes |
Windows version | Saw the problem? |
---|---|
Insider Build (xxxxx) | |
May 2021 Update (19043) | |
October 2020 Update (19042) | |
May 2020 Update (19041) | Yes |
November 2019 Update (18363) | |
May 2019 Update (18362) | |
October 2018 Update (17763) | |
April 2018 Update (17134) | |
Fall Creators Update (16299) | |
Creators Update (15063) |
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
Xbox | |
Surface Hub | |
IoT |
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Reactions:14
- Comments:40 (13 by maintainers)
Top Results From Across the Web
c# - ContentDialog wasn't shown Over the Popup When ...
When a popup with ShouldConstrainToRootBounds = false is first shown, it's placed in its own window and shown in that context. That's why...
Read more >Popup.ShouldConstrainToRootBounds Property
Gets or sets a value that indicates whether the popup should be shown within the bounds of the XAML root. This property is...
Read more >Popup.ShouldConstrainToRootBounds Property
This property is applicable only to apps running on the desktop. On other platforms (such as Xbox, HoloLens, etc.), it does not have...
Read more >Fix ComboBox displaying incorrectly in ViewBox in UWP ...
ShouldConstrainToRootBounds is a property that determines if a popup should show within its XAML root, or in a separate top level window.
Read more >Microsoft release Windows UI Library 3 Preview 4
More specifically, the ShouldConstrainToRootBounds property always acts as if it's set to true , regardless of the property value. Inking ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@codendone thank you for the transparency on the timeline. We’ve been waiting for a long time for this to be fixed and 1.4 is too far away, it’s not the only issue we’ve had but most of the time we’re able to work around them. This issue, however, doesn’t have any known workarounds and it’s one of the top frustrations for our user base.
I hope you can take this feedback into consideration and increase the priority of getting this into a servicing release so that we don’t have to wait for 1.4.
@gabbybilka are there any updates on this? Overall, our experience has been positive, but this is one of the main issues we’re having since migrating to WinAppSdk.