Scrollr not work with popup

1 Answer 380 Views
Popup
Daniel
Top achievements
Rank 1
Silver
Bronze
Daniel asked on 10 Mar 2022, 12:50 PM | edited on 10 Mar 2022, 12:54 PM

Hi,

I want scroller view with popup.

I use your scroller but is not working , why ?

 

           <telerikPrimitives:RadPopup.Popup Margin="10">
                <telerikPrimitives:RadPopup x:Name="popupError"
                                  IsModal="True"
                                  OutsideBackgroundColor="#6F000000"
                                            Placement='Center'>
                    <telerikMauiControls:RadBorder CornerRadius="8"
                                         BackgroundColor="{DynamicResource PrimaryColor}">
                        <telerikMauiControls:RadScrollView >
                        <Grid Padding="20"
                                WidthRequest="200"
                                HeightRequest="170">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="40" />
                                <RowDefinition Height="70" />
                             </Grid.RowDefinitions>
                            <Button Grid.Row="0"
                                    Padding="2"
                                   HorizontalOptions="End"
                                   Text="X"
                                   Clicked="OnClosePopup" 
                                  BackgroundColor="{DynamicResource PrimaryColor}" TextColor="White" />
                                  <Label x:Name="labelError" Grid.Row="1" Text="" TextColor="White"/>
                                 </Grid>
                         </telerikMauiControls:RadScrollView>
                    </telerikMauiControls:RadBorder>
                </telerikPrimitives:RadPopup>
            </telerikPrimitives:RadPopup.Popup>

1 Answer, 1 is accepted

Sort by
0
Nikola
Telerik team
answered on 23 Mar 2022, 02:05 PM

Hello Daniel,

Thank you for sharing your case with us.

Scrolling inside the Popup can be achieved if you add HeightRrequest in the ScrollView/RadScrollView. All elements inside the Popup need to be measured.

Example:                                            
    <Grid Margin="10">
        <Button x:Name="button"
HorizontalOptions="Center"
VerticalOptions="Start"
Text="Show more info"
Clicked="ShowPopup">
            <telerikPrimitives:RadPopup.Popup Margin="10">
                <telerikPrimitives:RadPopup x:Name="popup"
IsModal="True"
OutsideBackgroundColor="#6F000000"
Placement='Center'>
                    <telerik:RadBorder CornerRadius="8"
BackgroundColor="WhiteSmoke"
Padding="10"
Margin="20">
  <telerik:RadScrollView HeightRequest="200">
                            <Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto,*,Auto">
                                <Button Padding="2"
HorizontalOptions="End" Margin="20"
Text="x"
Clicked="ClosePopup"
TextColor="Black" />
                                <Label Grid.Row="1" Text= "Label text inside the popup " BackgroundColor="Red"
HeightRequest="200" TextColor="Black"/>
                                <Label Grid.Row="2" Text= "Label text inside the popup " TextColor="Black"/>
                                <Label Grid.Row="3" Text= "Label text inside the popup " TextColor="Black"/>
                                <Label Grid.Row="4" Text= "Label text inside the popup " TextColor="Black"/>
                                <Label Grid.Row="5" Text= "Label text inside the popup " TextColor="Black"/>

                            </Grid>
                        </telerik:RadScrollView>
                    </telerik:RadBorder>
                </telerikPrimitives:RadPopup>
            </telerikPrimitives:RadPopup.Popup>
        </Button>
    </Grid>

Regards, Nikola 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.

Tags
Popup
Asked by
Daniel
Top achievements
Rank 1
Silver
Bronze
Answers by
Nikola
Telerik team
Share this question
or