Popup Location

1 Answer 118 Views
Popup
Daniel
Top achievements
Rank 1
Silver
Bronze
Daniel asked on 04 Apr 2022, 09:33 AM

Hi,

I have this code and I want the popup appear on the grid not on the button?

Thaks,
        <HorizontalStackLayout Grid.Row="1"  HorizontalOptions="End">
                <telerik:RadButton Text="Remove" WidthRequest="100" BackgroundColor="Red" Margin="10" Command="{Binding OnRemoveSchedulerCommand}">
                    <telerikPrimitives:RadPopup.Popup>
                        <telerikPrimitives:RadPopup  IsOpen="{Binding ShowPopupOnRemoveScheduler}"
                                  IsModal="True" Placement="Center"
                                  OutsideBackgroundColor="#6F000000">
                            <telerikMauiControls:RadBorder CornerRadius="8"
                                         BackgroundColor="{DynamicResource PrimaryColor}">
                                <Grid Padding="20"
                                WidthRequest="300"
                                HeightRequest="220">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="40" />
                                        <RowDefinition Height="70" />
                                        <RowDefinition Height="40" />
                                    </Grid.RowDefinitions>
                                    <Button Grid.Row="0"
                                    Padding="2"
                                   HorizontalOptions="End"
                                   Text="X"
                                   Command="{Binding ClosePopupOnRemoveScheduler}"
                                  BackgroundColor="{DynamicResource PrimaryColor}" TextColor="White" />
                                    <Label Grid.Row="1" Text="Are you sure you want to delete the scheduler ?" TextColor="White" HorizontalOptions="Center" VerticalOptions="Center"/>
                                    <HorizontalStackLayout Grid.Row="2" HorizontalOptions="End">
                                        <telerik:RadButton Text="Cancel"  Padding="2" BackgroundColor="{DynamicResource PrimaryColor}" TextColor="White"  Margin="10" Command="{Binding ClosePopupOnRemoveScheduler}"/>
                                        <telerik:RadButton Text="OK" Padding="2" BackgroundColor="{DynamicResource PrimaryColor}" TextColor="White"  Margin="10" Command="{Binding RemoveSchedulerCommand}"/>
                                    </HorizontalStackLayout>
                                </Grid>
                            </telerikMauiControls:RadBorder>
                        </telerikPrimitives:RadPopup>
                    </telerikPrimitives:RadPopup.Popup>

                </telerik:RadButton>
                <telerik:RadButton Text="Add"   WidthRequest="100" BackgroundColor="#1ABB9C" Margin="10" Command="{Binding OnNewSchedulerCommand}"/>

            </HorizontalStackLayout>
    

1 Answer, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 04 Apr 2022, 12:40 PM

Hello Daniel,

Please read the following documentation to learn how to place the popup where you want it to Popup Documentation | Placement.

Regards,
Lance | Manager Technical Support
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 04 Apr 2022, 02:09 PM

I remove the inner code from the grid, to the main layout(PlacementTarget) and it works-:).

Tags
Popup
Asked by
Daniel
Top achievements
Rank 1
Silver
Bronze
Answers by
Lance | Manager Technical Support
Telerik team
Share this question
or