microsoft-ui-xaml
microsoft-ui-xaml copied to clipboard
The ShouldConstrainToRootBounds property of the Popup doesn't work
Describe 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
ShouldConstrainToRootBounds="False"
is not yet supported in WinUI 3.
Thanks, @codendone . Could you add a note\remark in the documentation about that?
@gabbybilka Can we update the doc above to reflect that False is not yet supported? Thanks!
@krschau, yes!
Closing this, since the doc was updated. I'll try to leave a note here when this feature does light up.
@gabbybilka Is there any update as to when this feature will be available in WinUI 3, as it is essential for some apps - Specifically FlyoutBase.ShouldConstrainToRootBounds
@krschau why was this closed when it hasn't been fixed yet?
ShouldConstrainToRootBounds="False"
Still doesn't work in winui 3.
@Samuel12321 We should be enabling this soon, although it won't be quite soon enough for the WinAppSDK 1.0 release. As I mentioned when I closed it, I think that since it's now appropriately documented, this particular issue can be closed. This doesn't mean that we aren't working on enabling the feature.
I see pros and cons in closing or leaving issues open issues in situations like this, and we'll adjust if we see that the way we're doing it isn't helpful as we go forward.
Tracked internally by https://task.ms/36484033
Will a fix for this be included for 1.1?
@Samuel12321 Additional feature work was necessary to properly support ShouldConstrainToRootBounds=False. That work is in progress, but it looks like it won't be complete in time for 1.1.
@codendone is there any update as to when this issue will be fixed. Its currently blocking my team from using WINUI 3.
@Samuel12321 Nothing new here from my previous comment: This unfortunately won't be enabled in 1.1. I'm hoping it will be in 1.2, but can't say for sure at this time.
@codendone is there any chance this will make it to one of the 1.1 servicing releases? Sorry to bug, but this is a hugely problematic issue for my team and a few other projects I'm aware of.
@Samuel12321 I expect this wouldn't be appropriate for 1.1 servicing, because behind the scenes this is a pretty substantial change. We understand it's a pretty huge pain point, though, and are actively working on it.
Looking forward have such a functionality available for WinUI3 apps :)
@krschau Will this be part of 1.2?
@codendone @krschau will this be part of 1.2?
@Samuel12321 Unfortunately this will not be in 1.2. Most of the implementation is complete, but there are a few critical issues which still need to be addressed.
I really hope this'll come sooner rather than later. It's probably the only feature I'd even use an experimental build for.
Been almost 2 years since this issue was opened and it still hasn't been solved, even though apps like Files would benefit GREATLY from it. Is there any ETA or will there continue to be silence until someone else comes and complains about it?
EDIT: I'm also tired of Microsoft not saying anywhere that this is not a stable framework. Every time I tried to do something, I hit a roadblock or a bug. It's insane.
I second what AZ said. This feature is very useful for many programs, and it also allows flyouts to work in more areas. Controls need to be able to spawn outside of the window bounds. Will there be an ETA? The last 3 predictions have been inaccurate. First, you said it would be in 1.0. Nope. Then, you said it'll probably be in 1.1. Nope. Now you're saying it won't be in 1.2. Will this come in 1.3? It's been just shy of two years and this feature still doesn't work.
I also agree. I am currently stuck on XAML Islands primarily because WinUI 3 doesn't implement this.
@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.
Will this ever be fixed?
No Assignees, No Projects and No Milestones yet. - Quite a good time period passed and it's getting frustrating and it feels like writing into a void. - Is there someone out there who actually can help out about this?
This continues to be a work in progress. It still isn't ready to be part of the upcoming 1.3 release, but the goal is to complete it for 1.4.
@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.
this feature is really missed.
1.3 fixed nothing important, most bugs reported to WinUI team is being ignored.
It's too inefficient and I hope .Net team could hand over the repo one day as they are very efficient and never delay their due date. For WinUI team: Oh it's too hard and let's arrange it to next release (Repeat it); For .Net team: Oh it's too hard let's gathering around to solve it!
Sorry for the complaints and that's what I thought to WinUI team with very disappointment.