menu

Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PopupStyle - Xamarin.Android API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PopupStyle

    Represents the style of SfPopupLayout.

    Inheritance
    System.Object
    PopupStyle
    Namespace: Syncfusion.Android.PopupLayout
    Assembly: Syncfusion.SfPopupLayout.Android.dll
    Syntax
    public class PopupStyle : Object

    Constructors

    PopupStyle()

    Initializes a new instance of the PopupStyle class.

    Declaration
    public PopupStyle()

    Properties

    AcceptButtonBackgroundColor

    Gets or sets the background color of accept button in the footer.

    Declaration
    public Color AcceptButtonBackgroundColor { get; set; }
    Property Value
    Type
    Android.Graphics.Color
    Examples
    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    
    namespace SfPopupGettingStarted
    {
        public partial class MainPage : ContentPage
        {
            SfPopupLayout popupLayout;
            public MainPage()
            {
                InitializeComponent();
                popupLayout = new SfPopupLayout();
                var layout = new StackLayout();
                var clickToShowPopup = new Button()
                {
                    Text = "ClickToShowPopup",
                    VerticalOptions = LayoutOptions.Start,
                    HorizontalOptions = LayoutOptions.FillAndExpand
                };
                layout.Children.Add(clickToShowPopup);
                Content = popupLayout;
                popupLayout.Content = layout;
                clickToShowPopup.Clicked += ClickToShowPopup_Clicked;
                popupLayout.PopupView.PopupStyle.AcceptButtonBackgroundColor = Color.Green;
            }
            private void ClickToShowPopup_Clicked(object sender, EventArgs e)
            {
                popupLayout.Show();
            }
        }
    }
    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle  AcceptButtonBackgroundColor="Green"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    AcceptButtonTextColor

    Gets or sets the foreground color of accept button in the footer.

    Declaration
    public Color AcceptButtonTextColor { get; set; }
    Property Value
    Type
    Android.Graphics.Color
    Examples

    The following code example demonstrates how to set the Accept button text Color for the .

    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    

    namespace SfPopupGettingStarted { public partial class MainPage : ContentPage {
    SfPopupLayout popupLayout; public MainPage() { InitializeComponent(); popupLayout = new SfPopupLayout(); var layout = new StackLayout(); var clickToShowPopup = new Button() { Text = "ClickToShowPopup", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; layout.Children.Add(clickToShowPopup); Content = popupLayout; popupLayout.Content = layout; clickToShowPopup.Clicked += ClickToShowPopup_Clicked; popupLayout.PopupView.PopupStyle.AcceptButtonTextColor = Color.Red; } private void ClickToShowPopup_Clicked(object sender, EventArgs e) { popupLayout.Show(); } } }

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle  AcceptButtonTextColor="Red"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    BorderColor

    Gets or sets the border color for the PopupView.

    Declaration
    public Color BorderColor { get; set; }
    Property Value
    Type Description
    Android.Graphics.Color

    The border color for the PopupView.

    Examples

    The following code example demonstrates how to set the Border color for the .

    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    

    namespace SfPopupGettingStarted { public partial class MainPage : ContentPage { SfPopupLayout popupLayout; public MainPage() { InitializeComponent(); popupLayout = new SfPopupLayout(); var layout = new StackLayout(); var clickToShowPopup = new Button() { Text = "ClickToShowPopup", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; layout.Children.Add(clickToShowPopup); Content = popupLayout; popupLayout.Content = layout; clickToShowPopup.Clicked += ClickToShowPopup_Clicked; popupLayout.PopupView.PopupStyle.BorderColor = Color.Blue; } private void ClickToShowPopup_Clicked(object sender, EventArgs e) { popupLayout.Show(); } } }

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle  BorderColor="Blue"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    BorderThickness

    Gets or sets the border thickness for the PopupView.

    Declaration
    public int BorderThickness { get; set; }
    Property Value
    Type Description
    System.Int32

    The border thickness for the PopupView.

    Examples

    The following code example demonstrates how to set the Border thickness for the .

    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    

    namespace SfPopupGettingStarted { public partial class MainPage : ContentPage { SfPopupLayout popupLayout; public MainPage() { InitializeComponent(); popupLayout = new SfPopupLayout(); var layout = new StackLayout(); var clickToShowPopup = new Button() { Text = "ClickToShowPopup", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; layout.Children.Add(clickToShowPopup); Content = popupLayout; popupLayout.Content = layout; clickToShowPopup.Clicked += ClickToShowPopup_Clicked; popupLayout.PopupView.PopupStyle.BorderThickness = 20; } private void ClickToShowPopup_Clicked(object sender, EventArgs e) { popupLayout.Show(); } } }

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle  BorderThickness="20"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    CloseButtonIcon

    Gets or sets the image to be placed in the header close button.

    Declaration
    public int CloseButtonIcon { get; set; }
    Property Value
    Type
    System.Int32

    CornerRadius

    Gets or sets the corner radius for the PopupView.

    Declaration
    public int CornerRadius { get; set; }
    Property Value
    Type Description
    System.Int32

    The corner radius for the PopupView.

    Examples

    The following code example demonstrates how to set the Corner radius for the .

    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    

    namespace SfPopupGettingStarted { public partial class MainPage : ContentPage { SfPopupLayout popupLayout; public MainPage() { InitializeComponent(); popupLayout = new SfPopupLayout(); var layout = new StackLayout(); var clickToShowPopup = new Button() { Text = "ClickToShowPopup", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; layout.Children.Add(clickToShowPopup); Content = popupLayout; popupLayout.Content = layout; clickToShowPopup.Clicked += ClickToShowPopup_Clicked; popupLayout.PopupView.PopupStyle.CornerRadius = 20; } private void ClickToShowPopup_Clicked(object sender, EventArgs e) { popupLayout.Show(); } } }

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle  CornerRadius="20"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    DeclineButtonBackgroundColor

    Gets or sets the background color of decline button in the footer.

    Declaration
    public Color DeclineButtonBackgroundColor { get; set; }
    Property Value
    Type
    Android.Graphics.Color
    Examples

    The following code example demonstrates how to set the Decline button background color for the .

    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    

    namespace SfPopupGettingStarted { public partial class MainPage : ContentPage { SfPopupLayout popupLayout; public MainPage() { InitializeComponent(); popupLayout = new SfPopupLayout(); var layout = new StackLayout(); var clickToShowPopup = new Button() { Text = "ClickToShowPopup", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; layout.Children.Add(clickToShowPopup); Content = popupLayout; popupLayout.Content = layout; clickToShowPopup.Clicked += ClickToShowPopup_Clicked; popupLayout.PopupView.PopupStyle.DeclineButtonBackgroundColor = Color.Green; } private void ClickToShowPopup_Clicked(object sender, EventArgs e) { popupLayout.Show(); } } }

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle  DeclineButtonBackgroundColor="Green"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    DeclineButtonTextColor

    Gets or sets the foreground color of decline button in the footer.

    Declaration
    public Color DeclineButtonTextColor { get; set; }
    Property Value
    Type
    Android.Graphics.Color
    Examples

    The following code example demonstrates how to set the Decline button text color for the .

    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    

    namespace SfPopupGettingStarted { public partial class MainPage : ContentPage { SfPopupLayout popupLayout; public MainPage() { InitializeComponent(); popupLayout = new SfPopupLayout(); var layout = new StackLayout(); var clickToShowPopup = new Button() { Text = "ClickToShowPopup", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; layout.Children.Add(clickToShowPopup); Content = popupLayout; popupLayout.Content = layout; clickToShowPopup.Clicked += ClickToShowPopup_Clicked; popupLayout.PopupView.PopupStyle.DeclineButtonTextColor = Color.Red; } private void ClickToShowPopup_Clicked(object sender, EventArgs e) { popupLayout.Show(); } } }

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle  DeclineButtonTextColor="Red"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    FooterBackgroundColor

    Gets or sets the background color of the footer.

    Declaration
    public Color FooterBackgroundColor { get; set; }
    Property Value
    Type
    Android.Graphics.Color
    Examples

    The following code example demonstrates how to set the Footer background color for the .

    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    

    namespace SfPopupGettingStarted { public partial class MainPage : ContentPage { SfPopupLayout popupLayout; public MainPage() { InitializeComponent(); popupLayout = new SfPopupLayout(); var layout = new StackLayout(); var clickToShowPopup = new Button() { Text = "ClickToShowPopup", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; layout.Children.Add(clickToShowPopup); Content = popupLayout; popupLayout.Content = layout; clickToShowPopup.Clicked += ClickToShowPopup_Clicked; popupLayout.PopupView.PopupStyle.FooterBackgroundColor = Color.Black; } private void ClickToShowPopup_Clicked(object sender, EventArgs e) { popupLayout.Show(); } } }

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle   FooterBackgroundColor="Black"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    HasShadow

    Gets or sets a value indicating whether a drop shadow is displayed around the PopupView. The default value is true.

    Declaration
    public bool HasShadow { get; set; }
    Property Value
    Type
    System.Boolean
    Examples

    The following code example demonstrates how to set the HasShadow property for the .

    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    

    namespace SfPopupGettingStarted { public partial class MainPage : ContentPage { SfPopupLayout popupLayout; public MainPage() { InitializeComponent(); popupLayout = new SfPopupLayout(); var layout = new StackLayout(); var clickToShowPopup = new Button() { Text = "ClickToShowPopup", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; layout.Children.Add(clickToShowPopup); Content = popupLayout; popupLayout.Content = layout; clickToShowPopup.Clicked += ClickToShowPopup_Clicked; popupLayout.PopupView.PopupStyle.HasShadow = false; } private void ClickToShowPopup_Clicked(object sender, EventArgs e) { popupLayout.Show(); } } }

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle  HasShadow="False"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    HeaderBackgroundColor

    Gets or sets the background color to be applied for the header.

    Declaration
    public Color HeaderBackgroundColor { get; set; }
    Property Value
    Type
    Android.Graphics.Color
    Examples

    The following code example demonstrates how to set the Header background color for the .

    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    

    namespace SfPopupGettingStarted { public partial class MainPage : ContentPage { SfPopupLayout popupLayout; public MainPage() { InitializeComponent(); popupLayout = new SfPopupLayout(); var layout = new StackLayout(); var clickToShowPopup = new Button() { Text = "ClickToShowPopup", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; layout.Children.Add(clickToShowPopup); Content = popupLayout; popupLayout.Content = layout; clickToShowPopup.Clicked += ClickToShowPopup_Clicked; popupLayout.PopupView.PopupStyle.HeaderBackgroundColor = Color.Blue; } private void ClickToShowPopup_Clicked(object sender, EventArgs e) { popupLayout.Show(); } } }

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 mlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle   HeaderBackgroundColor="Blue"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    HeaderTextColor

    Gets or sets the text color to be applied for the header title.

    Declaration
    public Color HeaderTextColor { get; set; }
    Property Value
    Type
    Android.Graphics.Color
    Examples

    The following code example demonstrates how to set the Header text color for the .

    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    

    namespace SfPopupGettingStarted { public partial class MainPage : ContentPage { SfPopupLayout popupLayout; public MainPage() { InitializeComponent(); popupLayout = new SfPopupLayout(); var layout = new StackLayout(); var clickToShowPopup = new Button() { Text = "ClickToShowPopup", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; layout.Children.Add(clickToShowPopup); Content = popupLayout; popupLayout.Content = layout; clickToShowPopup.Clicked += ClickToShowPopup_Clicked; popupLayout.PopupView.PopupStyle.HeaderTextColor = Color.Aqua; } private void ClickToShowPopup_Clicked(object sender, EventArgs e) { popupLayout.Show(); } } }

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle  HeaderTextColor="Aqua"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    HeaderTextGravity

    Gets or sets the text alignment of the header.

    Declaration
    public GravityFlags HeaderTextGravity { get; set; }
    Property Value
    Type
    Android.Views.GravityFlags

    HeaderTextSize

    Gets or sets the text size of the header title.

    Declaration
    public int HeaderTextSize { get; set; }
    Property Value
    Type
    System.Int32

    HeaderTypeface

    Gets the font style to be applied for the header title.

    Declaration
    public Typeface HeaderTypeface { get; set; }
    Property Value
    Type
    Android.Graphics.Typeface

    HeaderTypefaceStyle

    Gets or sets the font attribute to be applied for the header title.

    Declaration
    public TypefaceStyle HeaderTypefaceStyle { get; set; }
    Property Value
    Type
    Android.Graphics.TypefaceStyle

    OverlayColor

    Gets or sets the color of the overlay when PopupView is displayed.

    Declaration
    public Color OverlayColor { get; set; }
    Property Value
    Type
    Android.Graphics.Color
    Examples

    The following code example demonstrates how to set the Overlay color for the .

    using Syncfusion.XForms.PopupLayout;
    using System;
    using Xamarin.Forms;
    

    namespace SfPopupGettingStarted { public partial class MainPage : ContentPage { SfPopupLayout popupLayout; public MainPage() { InitializeComponent(); popupLayout = new SfPopupLayout(); var layout = new StackLayout(); var clickToShowPopup = new Button() { Text = "ClickToShowPopup", VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.FillAndExpand }; layout.Children.Add(clickToShowPopup); Content = popupLayout; popupLayout.Content = layout; clickToShowPopup.Clicked += ClickToShowPopup_Clicked; popupLayout.PopupView.PopupStyle.OverlayColor = Color.Red; } private void ClickToShowPopup_Clicked(object sender, EventArgs e) { popupLayout.Show(); } } }

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns = "http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:SfPopupGettingStarted"
                 xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
                 x:Class="SfPopupGettingStarted.MainPage">
        <sfPopup:SfPopupLayout x:Name="popupLayout">
            <sfPopup:SfPopupLayout.PopupView>
                <sfPopup:PopupView>
                    <sfPopup:PopupView.PopupStyle>
                        <sfPopup:PopupStyle  OverlayColor="Red"/>
                    </sfPopup:PopupView.PopupStyle>
                </sfPopup:PopupView>
            </sfPopup:SfPopupLayout.PopupView>
            <sfPopup:SfPopupLayout.Content>
                <StackLayout x:Name="layout">
                    <Button x:Name="clickToShowPopup" Text="ClickToShowPopup" VerticalOptions="Start" HorizontalOptions="FillAndExpand" Clicked="ClickToShowPopup_Clicked"/>
                </StackLayout>
            </sfPopup:SfPopupLayout.Content>
        </sfPopup:SfPopupLayout>
    </ContentPage>

    OverlayOpacity

    Gets or sets a value indicating the overlay Color's Opacity. Set values between 0 to 255.

    Declaration
    public int OverlayOpacity { get; set; }
    Property Value
    Type
    System.Int32
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved