This is a migrated thread and some comments may be shown as answers.

Styling of Popup and height and width

1 Answer 447 Views
Popup
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 31 May 2019, 10:55 PM

I would like to mimic the style of display aleart found in andriod and ios sdk for a input dialog i have so far. But i do not no how to set the height and the width of the popup.

But its not quite their as you will see with the screen grab.

 

![](https://i.imgur.com/mRQ2YKm.png)

 

Also how would one allow the keyboard to dismiss the window. uppon clicking the keyboard return?.

01.<telerikPrimitives:RadPopup.Popup>
02.    <telerikPrimitives:RadPopup x:Name="popupQty"
03.                            IsModal="True"
04.                                Placement="Center"
05.                                
06.                            OutsideBackgroundColor="#B3FFF493">
07.        <telerikPrimitives:RadBorder
08.        CornerRadius="6"
09.        BackgroundColor="#93D7FF"
10.        Padding="10">
11.            <Grid>
12.                <Grid.RowDefinitions>
13.                    <RowDefinition Height="100" />
14.                    <RowDefinition Height="100" />
15.                </Grid.RowDefinitions>
16.                <Label Text="Please enter qty"></Label>
17.                <telerikInput:RadEntry x:Name="txtQty"/>
18. 
19. 
20. 
21.                <Button Grid.Row="1"
22.                    Padding="2"
23.                    HorizontalOptions="Center"
24.                    Text="Close"
25.              
26.                    CornerRadius="6"
27.                    BackgroundColor="#7A9BFF"
28.                    TextColor="White" />
29.            </Grid>
30.        </telerikPrimitives:RadBorder>
31.    </telerikPrimitives:RadPopup>
32.</telerikPrimitives:RadPopup.Popup>

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 03 Jun 2019, 02:29 PM
Hi David,

The popup size depends on its content, so you could set WidthRequest and HeightRequest to the RadBorder element like this:

<telerikPrimitives:RadBorder
                WidthRequest="300"
                CornerRadius="6"
                BackgroundColor="#93D7FF"
                Padding="10">
....

As to the second question - you could subscribe to the Completed event of the RadEntry control and close the popup in its handler:

<telerikInput:RadEntry x:Name="txtQty" Completed="TxtQty_Completed"/>

and the event handler:

private void TxtQty_Completed(object sender, EventArgs e)
{
    popupQty.IsOpen = false;
}

Let me know whether such an approach would be suitable for you.

Regards,
Yana
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Popup
Asked by
David
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or