Comments (10)
I am seeing the same behavior on iOS
from prism.
Sorry. Looks like I am missing Popups need to rearchitect to use IDialogService. I am already using IDialogService
as you can see in here but now because RegisterDialog forced to accept View instead of MopupsPage now it seems I can't pass animation or also make the dialog to become full screen and then put my popup to anywhere (example is to put it at the bottom of the page or let's say I want the page behind the dialog to be little dark). Is this the expected @dansiegel or is there any other way to do this? Should I make this as new issue? Thank you
from prism.
Actually I announced several years ago that you should migrate away from Page based Navigation with Popups to Dialogs. It was always scheduled for v9.0 to completely remove that support.
As far as Popup specific properties you can generally either set them with the attached properties from either the DialogLayout or PopupDialogLayout as shown below
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:prism="http://prismlibrary.com"
xmlns:animation="clr-namespace:Mopups.Animations;assembly=Mopups"
prism:DialogLayout.CloseOnBackgroundTapped="False"
prism:PopupDialogLayout.HasSystemPadding="False"
x:Class="MauiApp2.MyDialog">
<prism:PopupDialogLayout.Animation>
<animation:MoveAnimation PositionIn="Top" PositionOut="Bottom" />
</prism:PopupDialogLayout.Animation>
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentView>
from prism.
Thank you @dansiegel . Attached properties working fine. But CloseOnBackgroundTapped
do nothing and also how to make this view to be fullscreen. Let's say I want it to be something like this
<ContentView
x:Class="PrismPopupsIssue.PopupView"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:animations="clr-namespace:Mopups.Animations;assembly=Mopups"
xmlns:prismPopupsIssue="clr-namespace:PrismPopupsIssue"
xmlns:xaml="http://prismlibrary.com"
Padding="40"
x:DataType="prismPopupsIssue:PopupViewModel"
xaml:DialogLayout.CloseOnBackgroundTapped="True"
xaml:PopupDialogLayout.HasSystemPadding="False"
BackgroundColor="#80000000"
HorizontalOptions="Fill"
VerticalOptions="Fill">
<xaml:PopupDialogLayout.Animation>
<animations:MoveAnimation PositionIn="Top" PositionOut="Bottom" />
</xaml:PopupDialogLayout.Animation>
<VerticalStackLayout
BackgroundColor="White"
Spacing="8"
VerticalOptions="Center">
<Label
FontAttributes="Bold"
FontSize="Header"
HorizontalOptions="Center"
Text="Hello from popup page" />
<Button
Command="{Binding GoBackCommand, Mode=OneTime}"
HorizontalOptions="Center"
Text="Go Back" />
</VerticalStackLayout>
</ContentView>
so the whole page will have little dark background and only my VerticalStackLayout
will have focus white like what Mopups do?
from prism.
Seems I missed the memo also.
After setting up with Dialogs as described I am unable to get a background click to dismiss dialog (in iOS). I tried both methods of the attached property @dansiegel shows and doing in the navigate like @albilaga did in the related project
from prism.
@ramtechjoe please open an issue for the issue you're having with the Dismiss on Background Tapped so we can track that appropriately.
from prism.
@dansiegel I added the new issue in here #3168
from prism.
@albilaga Thanks for opening the new issue
from prism.
@albilaga do you have any issues with the attached PopupDialogLayout? I cannot get things to compile when I have in my Xaml. Keep getting
XFC0000 Cannot resolve type "http://prismlibrary.com:PopupDialogLayout"
Weird thing is the intellisense shows up, so it at least in VS it seems like it sees it. But then won't compile
from prism.
@ramtechjoe nope. This is working on my machine https://github.com/albilaga/PrismPopupsIssue/blob/main/PrismPopupsIssue/PopupView.xaml#L17 ( I am using rider)
from prism.
Related Issues (20)
- [BUG] App crash with the attached sample project HOT 1
- [BUG] .NET 8 MAUI App crashes on startup HOT 2
- [BUG] Putting an app in background when a modal is being displayed crashes the App HOT 2
- [BUG] crash when resolve an object after async function in maui app HOT 3
- [BUG] System.ArgumentException: Page to remove must be contained on this Navigation Page HOT 4
- Tab Navigation working in iOS but not Android[BUG] HOT 7
- [BUG] Region is not working on Maui when Rider Debugger is attached HOT 7
- [BUG]DelegateCommand.ObservesProperty method does not function correctly HOT 1
- [BUG] [Regions] LayoutViewRegionAdapter should be mapped to Maui.Controls.Layout instead of Maui.Controls.Compatibility.Layout HOT 1
- [BUG] [Regions] [FlyoutPage] View discovery on FlyoutPage
- [Enhancement] [Regions] Add 'AddOrReplace' to IRegionBehaviorFactory HOT 3
- [BUG] In some cases, my Dedug will suddenly get stuck HOT 1
- [BUG] Popup Dialogs are hidden/covered by calling Page when called after returning from MAUI FilePicker HOT 4
- [BUG] Absolute navigation not working on iOS HOT 2
- [BUG] Wiring view models for pages in tabbed page are done by name HOT 1
- [BUG] Popup Dialog can't fullscreen and also DialogLayout.CloseOnBackgroundTapped not working. HOT 4
- Add CloseDialog to IDialogService or Extension Method
- [BUG] Prism and MauiCompatibility are incompatibile on Windows
- [BUG] Page.OnBackButtonPressed not called in MAUI Android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prism.