Coder Social home page Coder Social logo

Comments (10)

ramtechjoe avatar ramtechjoe commented on July 3, 2024

I am seeing the same behavior on iOS

from prism.

albilaga avatar albilaga commented on July 3, 2024

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.

dansiegel avatar dansiegel commented on July 3, 2024

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.

albilaga avatar albilaga commented on July 3, 2024

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.

ramtechjoe avatar ramtechjoe commented on July 3, 2024

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.

dansiegel avatar dansiegel commented on July 3, 2024

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

albilaga avatar albilaga commented on July 3, 2024

@dansiegel I added the new issue in here #3168

from prism.

ramtechjoe avatar ramtechjoe commented on July 3, 2024

@albilaga Thanks for opening the new issue

from prism.

ramtechjoe avatar ramtechjoe commented on July 3, 2024

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

albilaga avatar albilaga commented on July 3, 2024

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.