Telerik Forums
UI for Xamarin Forum
1 answer
254 views

I have a sample Xamarin Forms app (source located on GitHub here) where I need the dialog that pops when you click the button to center itself on the screen.  Instead it is centering in its parent.

I read you can center a Popup by attaching it to the page level.  And that works fine.  But the BindingContext for the popup can't be set in this way.

Our app uses a ContentPage that is comprised of a bunch of ContentViews.  And the ContentViews are the things that define the various popup dialogs (not the ContentPage).  Furthermore, the BindingContext is set at the ContentView level.  You can see an example of this in the code example I provided in the repo.

The repo defines a MainPage.xaml which hosts a ParentView which hosts a PopupView.  It should be easy to follow the structure.

How can this sample be changed to show the dialog in the center of the screen?

Yana
Telerik team
 answered on 10 Jul 2019
1 answer
50 views
How can an application be notified when a dialog is closed?  Is there something built into the dialog API that will notify when it's closing?
Yana
Telerik team
 answered on 10 Jul 2019
3 answers
303 views

I am using FreshMVVM and am having trouble getting a simple popup example to work.  

For my View I have...

<?xml version="1.0" encoding="utf-8" ?>     <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"                  xmlns:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"                  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"                  xmlns:local="clr-namespace:SampleApp"                  x:Class="SampleApp.MainPage"
        <StackLayout>             <telerikPrimitives:RadPopup.Popup>                 <telerikPrimitives:RadPopup IsOpen="{Binding Dialog1Open}">                     <Label Text="Dialog 1" />                 </telerikPrimitives:RadPopup>             </telerikPrimitives:RadPopup.Popup
            <telerikPrimitives:RadPopup.Popup>                 <telerikPrimitives:RadPopup IsOpen="{Binding Dialog2Open}">                     <Label Text="Dialog 2" />                 </telerikPrimitives:RadPopup>             </telerikPrimitives:RadPopup.Popup
            <Button Text="Open Dialog 1" Command="{Binding OpenDialog1}" />             <Button Text="Open Dialog 2" Command="{Binding OpenDialog2}" /> 
        </StackLayout
    </ContentPage>

and the ViewModel I have...

public class MainPageModel : FreshBasePageModel {
    public bool Dialog1Open { get; set; }
    public bool Dialog2Open { get; set; }
  
    public ICommand OpenDialog1
    {
        get         {
            return new Command(() => { Dialog1Open = true; });
        }
    }
  
    public ICommand OpenDialog2
    {
        get         {
            return new Command(() => { Dialog2Open = true; });
        }
    }
}

How would this code be changed to make my example work?

The complete source for my example can be found at...

https://github.com/JohnLivermore/SampleXamarinApp/tree/telerikpopupexample

Yana
Telerik team
 answered on 09 Jul 2019
1 answer
52 views
Which NuGet package do I install if I just want the Popup functionality?  Is it Telerik.UI.for.Xamarin.Common?
Yana
Telerik team
 answered on 09 Jul 2019
2 answers
121 views

I have a Forms app using RadPopup

var preview = new RadPopup();
             
preview.IsModal = true;
preview.Placement = PlacementMode.Center;
preview.PlacementTarget = overlay;
 
var containerGrid = new Grid { Padding = 10 };
// populate grid here
 
preview.Content = containerGrid;
 
preview.IsOpen = true;

 

this works great on Android.  On iOS nothing happens.  The popup does not display, and I don't see any errors, exceptions or console messages.

Any suggestions on what might be wrong, or how I can go about debugging this?

Telerik 2019.1.318.1

XF 3.6.0.344457

iOS 12.2

 

Didi
Telerik team
 answered on 06 Jun 2019
1 answer
451 views

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>
Yana
Telerik team
 answered on 03 Jun 2019
3 answers
167 views

Hi,

I am playing around with the PopUp but I have several basic issues:

 

  1. I would like the Modal PopUp to close when I click outside the PopUp (This is how the Non-Modal popup behaves??).
  2. When I add a "Non-Modal" popup, I would like my page to stay active (right now the PopUp will close when I click outside the PopUp, but the content on my page is not active until the PopUp is closed.)
  3. I find it difficult to position the PopUp - How can I place it horizontally centered with a margin to the left and the right and vertically on top with a margin? (If I add Margin to the border inside the PopUp's content, then the "Non-Modal "popup wont close when I click on the area defined by the "Margin")

Best regards,

 

Yana
Telerik team
 answered on 04 Apr 2019
1 answer
68 views

Hi,

I have a Picker inside a Popup. I want to open the picker from the code. Usually I would call ".Focus", but it gives an error:

 

System.ObjectDisposedException: Cannot access a disposed object.

Object name: 'Xamarin.Forms.Platform.Android.AppCompat.PickerRenderer'.

(The same happens if I try to set focus to an Entry.)

Please help!

 

Best regards,

Michael

Yana
Telerik team
 answered on 21 Feb 2019
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?