Skip to content

Included API reference for Public API in toolkit Popup UG #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions maui-toolkit/Popup/Popup-Events.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ There are four built-in events in the SfPopup control namely:

## Opening event

The `Opening` event will be fired whenever opening the Popup in the application. It can cancel popup opening with `CancelEventArgs` that contains the following property:
The [Opening](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_Opening) event will be fired whenever opening the Popup in the application. It can cancel popup opening with `CancelEventArgs` that contains the following property:

* `Cancel`: Popup opening is based on this value.

Expand All @@ -43,7 +43,7 @@ private void Popup_Opening(object sender, System.ComponentModel.CancelEventArgs

## Opened event

The `Opened` event will be fired whenever displaying the Popup in the application.
The [Opened](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_Opened) event will be fired whenever displaying the Popup in the application.

You can execute your own set of codes once the popup is opened, and visible in the application in its respective event handler.

Expand All @@ -68,7 +68,7 @@ private void Popup_Opened(object sender, EventArgs e)

## Closing event

The `Closing` event will be fired whenever closing the Popup in the application. It can cancel the popup closing with `CancelEventArgs` that contains the following property:
The [Closing](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_Closing) event will be fired whenever closing the Popup in the application. It can cancel the popup closing with `CancelEventArgs` that contains the following property:

* `Cancel`: Popup closing is based on this value.

Expand All @@ -93,7 +93,7 @@ private void Popup_Closing(object sender, System.ComponentModel.CancelEventArgs

## Closed event

The `Closed` event will be fired whenever dismissing the Popup from the view.
The [Closed](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_Closed) event will be fired whenever dismissing the Popup from the view.

You can execute your own set of codes once the popup is completely closed in its respective event handler.

Expand All @@ -118,15 +118,15 @@ private void Popup_Closed(object sender, EventArgs e)

## Accept command

The `AcceptCommand` will be fired when clicking the Accept button in the popup footer.
The [AcceptCommand](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_AcceptCommand) will be fired when clicking the Accept button in the popup footer.

To handle the Accept button,

* Derive a class from the `ICommand`, and implement its interface.
* To prevent the popup from closing, return false in the `CanExecute()` override method and the `Execute()` override method will not be fired.
* Else return true in the `CanExecute()` override method and do the required operations in the `Execute()` method.
* Now, create a property of your custom command type in the view model class and initialize it.
* Bind the property in the view model to the `AcceptCommand` in XAML.
* Bind the property in the view model to the [AcceptCommand](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_AcceptCommand) in XAML.

{% tabs %}

Expand Down Expand Up @@ -199,15 +199,15 @@ class PopupViewModel : INotifyPropertyChanged

## Decline command

The `DeclineCommand` will be fired when clicking the Decline button in the popup footer.
The [DeclineCommand](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_DeclineCommand) will be fired when clicking the Decline button in the popup footer.

To handle the Decline button,

* Derive a class from the ICommand, and implement its interface.
* To prevent the popup from closing, return false in the `CanExecute()` override method and the `Execute()` override method will not be fired.
* Else return true in the `CanExecute()` override method and do the required operations in the `Execute()` method.
* Now, create a property of your custom command type in the view model class and initialize it.
* Bind the property in the view model to the `DeclineCommand` in XAML.
* Bind the property in the view model to the [DeclineCommand](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_DeclineCommand) in XAML.

{% tabs %}

Expand Down
30 changes: 15 additions & 15 deletions maui-toolkit/Popup/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ documentation: ug

# Getting Started with .NET MAUI Popup

This section guides you through setting up and configuring a `Popup` in your .NET MAUI application. Follow the steps below to add a basic Popup to your project.
This section guides you through setting up and configuring a [Popup](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html) in your .NET MAUI application. Follow the steps below to add a basic Popup to your project.

{% tabcontents %}
{% tabcontent Visual Studio %}
Expand Down Expand Up @@ -68,7 +68,7 @@ namespace GettingStarted
## Step 4: Add a Basic Popup

1. To initialize the control, import the `Syncfusion.Maui.Toolkit.Popup` namespace into your code.
2. Initialize `SfPopup` class.
2. Initialize [SfPopup](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html) class.

{% tabs %}
{% highlight xaml tabtitle="MainPage.xaml" %}
Expand Down Expand Up @@ -100,7 +100,7 @@ public partial class MainPage : ContentPage

## Step 5: Displaying popup

Display a popup over your view by calling the `Show` method.
Display a popup over your view by calling the [Show](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_Show_System_Boolean_) method.

Refer to the following code example for displaying popup using Button's Click event.

Expand Down Expand Up @@ -215,7 +215,7 @@ namespace GettingStarted
## Step 4: Add a Basic Popup

1. To initialize the control, import the `Syncfusion.Maui.Toolkit.Popup` namespace into your code.
2. Initialize `SfPopup` class.
2. Initialize [SfPopup](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html) class.

{% tabs %}
{% highlight xaml tabtitle="MainPage.xaml" %}
Expand Down Expand Up @@ -247,7 +247,7 @@ public partial class MainPage : ContentPage

## Step 5: Displaying popup

Display a popup over your view by calling the `Show` method.
Display a popup over your view by calling the [Show](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_Show_System_Boolean_) method.

Refer to the following code example for displaying popup using Button's Click event.

Expand Down Expand Up @@ -361,7 +361,7 @@ namespace GettingStarted
## Step 4: Add a Basic Popup

1. To initialize the control, import the `Syncfusion.Maui.Toolkit.Popup` namespace into your code.
2. Initialize `SfPopup` class.
2. Initialize [SfPopup](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html) class.

{% tabs %}
{% highlight xaml tabtitle="MainPage.xaml" %}
Expand Down Expand Up @@ -395,7 +395,7 @@ public partial class MainPage : ContentPage

## Close the popup

To close the popup programmatically, you can call either the `Dismiss` method or set the IsOpen property to false.
To close the popup programmatically, you can call either the [Dismiss](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_Dismiss) method or set the IsOpen property to false.

Refer to the following code example for dismissing popup.

Expand All @@ -419,17 +419,17 @@ The .NET MAUI Popup (SfPopup) allows showing the popup content at various positi

The following list of options is available to position the SfPopup in the desired position:

* `Center Positioning`: Use the `IsOpen` property or `Show` method to display the SfPopup at the center.
* `Absolute Positioning`: Use the `Show(x-position, y-position)` to display the SfPopup at the specified X and y position.
* `Relative Positioning`: Use the `ShowRelativeToView(View, RelativePosition)` to display the SfPopup at any of the 8 positions relative to the specified view.
* `Absolute relative positioning`: Use the `ShowRelativeToView(View, RelativePosition,x position,y position)` to display the SfPopup at an absolute x,y coordinate from the relative position of the specified view.
* `Center Positioning`: Use the [IsOpen](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_IsOpen) property or [Show](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_Show_System_Boolean_) method to display the SfPopup at the center.
* `Absolute Positioning`: Use the [Show(x-position, y-position)](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_Show_System_Double_System_Double_) to display the SfPopup at the specified X and y position.
* `Relative Positioning`: Use the [ShowRelativeToView(View, RelativePosition)](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_ShowRelativeToView_Microsoft_Maui_Controls_View_Syncfusion_Maui_Toolkit_Popup_PopupRelativePosition_System_Double_System_Double_) to display the SfPopup at any of the 8 positions relative to the specified view.
* `Absolute relative positioning`: Use the [ShowRelativeToView(View, RelativePosition,x position,y position)](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_ShowRelativeToView_Microsoft_Maui_Controls_View_Syncfusion_Maui_Toolkit_Popup_PopupRelativePosition_System_Double_System_Double_) to display the SfPopup at an absolute x,y coordinate from the relative position of the specified view.

## Customizing layouts

By default, choose a layout from the following available layouts in the SfPopup by using the `AppearanceMode` property.
By default, choose a layout from the following available layouts in the SfPopup by using the [AppearanceMode](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_AppearanceMode) property.

* `OneButton`: Shows the SfPopup with one button in the footer view. This is the default value.
* `TwoButton`: Shows the SfPopup with two buttons in the footer view.
* [OneButton]()https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.PopupButtonAppearanceMode.html#Syncfusion_Maui_Toolkit_Popup_PopupButtonAppearanceMode_OneButton) : Shows the SfPopup with one button in the footer view. This is the default value.
* [TwoButton](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.PopupButtonAppearanceMode.html#Syncfusion_Maui_Toolkit_Popup_PopupButtonAppearanceMode_TwoButton): Shows the SfPopup with two buttons in the footer view.

Also, customize the entire popup view by loading the templates or custom views for the header, body, and footer.

Expand Down Expand Up @@ -487,7 +487,7 @@ namespace GettingStarted

## Load template view in the popup body

Any view can be added as popup content by using the `ContentTemplate` property to refresh it. Refer to the following code example in which a label is added as popup content.
Any view can be added as popup content by using the [ContentTemplate](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_ContentTemplate) property to refresh it. Refer to the following code example in which a label is added as popup content.

{% tabs %}

Expand Down
Loading