Popup - dynamic content

1 Answer 167 Views
Popup
Daniel
Top achievements
Rank 1
Silver
Bronze
Daniel asked on 05 Apr 2022, 03:19 PM

Hi,

How can build pop that its content is dynamic, for big and small messages.

Thanks,
  <telerikPrimitives:RadPopup.Popup >
                <telerikPrimitives:RadPopup x:Name="popupError"
                                  IsModal="False"
                                  OutsideBackgroundColor="#6F000000"
                                            Placement='Center'>
                    <telerikMauiControls:RadBorder CornerRadius="8" x:Name="radBorderPopup"
                                         BackgroundColor="{DynamicResource SecondaryColor}" BorderThickness="4, 0,0,0" BorderColor="Red">
                        <VerticalStackLayout WidthRequest="300">
                            <StackLayout>
                            <Label  Text="Setting Errors" TextColor="Black" HorizontalOptions="Center" VerticalOptions="Center" FontSize="Small"/>
                                <Button 
                                    Padding="2"
                                   HorizontalOptions="End" VerticalOptions="Center"
                                   Text="X" WidthRequest="30" HeightRequest="30"
                                   Clicked="OnClosePopup" 
                                  BackgroundColor="{DynamicResource PrimaryColor}" TextColor="White" />
                            </StackLayout>
                            <Label x:Name="labelError"  Grid.ColumnSpan="2" TextColor="Black" HorizontalOptions="Center" VerticalOptions="Center"/>
                       </VerticalStackLayout>
                   </telerikMauiControls:RadBorder>
                </telerikPrimitives:RadPopup>
            </telerikPrimitives:RadPopup.Popup>

1 Answer, 1 is accepted

Sort by
0
Lance | Senior Manager Technical Support
Telerik team
answered on 05 Apr 2022, 03:53 PM

Hello Daniel,

You can set whatever you want inside the RadPopup.Content, it's just. As far as guidance for how to change that content is up to you, we have no official guidance because it is a general software development topic and is up to the developer to implement how they see fit.

You can ask the XAML development community on StackOverflow for suggestions. As a starter suggestion, just change the FontSize of the Label if you only want to have a difference between large and small

 

Tip: You do not have to make your community question is specific to "Telerik RadPopup", that will overcomplicate the issue.  Just ask "how do I dynamically change the content of a XAML element , ie a Grid"

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.

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