microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

The ShouldConstrainToRootBounds property of the Popup doesn't work

Open alexdi220 opened this issue 3 years ago • 19 comments

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 image

image

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

alexdi220 avatar Sep 24 '21 11:09 alexdi220

ShouldConstrainToRootBounds="False" is not yet supported in WinUI 3.

codendone avatar Sep 28 '21 05:09 codendone

Thanks, @codendone . Could you add a note\remark in the documentation about that?

alexdi220 avatar Sep 28 '21 06:09 alexdi220

@gabbybilka Can we update the doc above to reflect that False is not yet supported? Thanks!

krschau avatar Oct 01 '21 18:10 krschau

@krschau, yes!

gabbybilka avatar Oct 01 '21 18:10 gabbybilka

Closing this, since the doc was updated. I'll try to leave a note here when this feature does light up.

krschau avatar Oct 12 '21 16:10 krschau

@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

Samuel12321 avatar Oct 27 '21 07:10 Samuel12321

@krschau why was this closed when it hasn't been fixed yet? ShouldConstrainToRootBounds="False" Still doesn't work in winui 3.

Samuel12321 avatar Oct 29 '21 21:10 Samuel12321

@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.

krschau avatar Oct 29 '21 22:10 krschau

Tracked internally by https://task.ms/36484033

asklar avatar Nov 24 '21 19:11 asklar

Will a fix for this be included for 1.1?

Samuel12321 avatar Feb 28 '22 02:02 Samuel12321

@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 avatar Mar 01 '22 03:03 codendone

@codendone is there any update as to when this issue will be fixed. Its currently blocking my team from using WINUI 3.

Samuel12321 avatar Apr 26 '22 06:04 Samuel12321

@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 avatar Apr 28 '22 23:04 codendone

@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 avatar Jun 23 '22 06:06 Samuel12321

@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.

krschau avatar Jun 23 '22 16:06 krschau

Looking forward have such a functionality available for WinUI3 apps :)

HannesHold avatar Jul 08 '22 19:07 HannesHold

@krschau Will this be part of 1.2?

Samuel12321 avatar Aug 20 '22 12:08 Samuel12321

@codendone @krschau will this be part of 1.2?

Samuel12321 avatar Sep 21 '22 00:09 Samuel12321

@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.

codendone avatar Sep 21 '22 02:09 codendone

I really hope this'll come sooner rather than later. It's probably the only feature I'd even use an experimental build for.

AlexanderBlackman avatar Oct 05 '22 08:10 AlexanderBlackman

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.

AnalogFeelings avatar Jan 23 '23 05:01 AnalogFeelings

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.

Pdawg-bytes avatar Jan 23 '23 18:01 Pdawg-bytes

I also agree. I am currently stuck on XAML Islands primarily because WinUI 3 doesn't implement this.

sylveon avatar Jan 25 '23 06:01 sylveon

@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.

yaira2 avatar Feb 14 '23 05:02 yaira2

Will this ever be fixed?

thexamlguy avatar Feb 22 '23 22:02 thexamlguy

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?

HannesHold avatar Apr 03 '23 20:04 HannesHold

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 avatar Apr 04 '23 02:04 codendone

@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.

yaira2 avatar Apr 04 '23 02:04 yaira2

this feature is really missed.

andrezzzini avatar Apr 14 '23 15:04 andrezzzini

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.

zhuxb711 avatar Apr 14 '23 16:04 zhuxb711