rotorgames / Rg.Plugins.Popup

Xamarin Forms popup plugin
MIT License
1.15k stars 336 forks source link

Close Button Click Event #756

Open raymond-dillon opened 1 year ago

raymond-dillon commented 1 year ago

I have a popup with the following layout

        <Image
            Margin="0"
            Source="{ Binding ImgSource, Source={x:Reference Root} }"
            HorizontalOptions="Center"
            VerticalOptions="Center"
            Aspect="AspectFit"
            HeightRequest="50"
            WidthRequest="50"
            Grid.Row="2"
            />

        <Label
            Grid.Column="1"
            Grid.Row="1"
            Text="{ Binding MessageType, Source={x:Reference Root} }"
            FontSize="14"
            FontAttributes="Bold"
            FontFamily="GothamBold.otf"
            TextColor="#425563"/>

        <Label
            Grid.Column="1"
            Grid.Row="2"
            x:Name="lblMessage"
            Text="{ Binding Message, Source={x:Reference Root} }"
            FontSize="Small"
            FontFamily="GothamBold.otf"/>

        <Label
            Grid.Column="1"
            Grid.Row="3"
            Text="{ Binding MessageDateTime, Source={x:Reference Root} }"
            FontSize="14"
            FontFamily="GothamBold.otf"
            FontAttributes="Bold"
            TextColor="#425563"/>

        <Button
             BackgroundColor="#425563"
                        TextColor="White"
                     Clicked="Button_Clicked"
                    VerticalOptions="Start"
                      FontFamily="GothamBold.otf"
                    Grid.Row="4"
                    Grid.Column="0"
            FontAttributes="Bold"
                    Grid.ColumnSpan="2"
            Text="CLOSE" />

    </Grid>

The "Button_Clicked" event is not firing and I was wondering is there something I'm doing wrong?

FaroukBel commented 1 year ago

Hello there, maybe you can provide the method code of the "Button_Clicked" in your code behind to see if there's a problem there.