You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<td>Static method to show a popup with the title, message and acceptText.</td></tr>
47
47
</table>
48
48
@@ -53,7 +53,7 @@ The `SfPopup` can be shown at the center by using the following options.
53
53
* IsOpen property
54
54
* SfPopup.Show
55
55
56
-
To open the `SfPopup`, use the `IsOpen` property as in the following code sample.
56
+
To open the `SfPopup`, use the [IsOpen](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_IsOpen) property as in the following code sample.
To open the SfPopup, use the `SfPopup.Show` method as in the following code sample.
84
+
To open the SfPopup, use the [SfPopup.Show](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_Show_System_Boolean_) method as in the following code sample.
To open the `SfPopup` in specific X and Y coordinates, use the `SfPopup.Show(x-position, y-position)` method as in the following code sample.
116
+
To open the `SfPopup` in specific X and Y coordinates, use the [SfPopup.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_) method as in the following code sample.
The `StartX` and `StartY` properties of the `SfPopup` control are used to define the coordinates for the popup to display.
144
+
The [StartX](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_StartX) and [StartY](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_StartY) properties of the `SfPopup` control are used to define the coordinates for the popup to display.
To open the `SfPopup` relative to a view, use the `SfPopup.ShowRelativeToView(View, RelativePosition)` method.
181
+
To open the `SfPopup` relative to a view, use the [SfPopup.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_) method.
The `SfPopup` can be displayed at an absolute x, y coordinate from the relative position of the specified view by using the following method.
209
209
210
-
To open the `SfPopup` in the specific x and y coordinate relative to a view, use the `SfPopup.ShowRelativeToView(View, RelativePosition, x-position, y-position)` method.
210
+
To open the `SfPopup` in the specific x and y coordinate relative to a view, use the [SfPopup.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_) method.

234
234
235
-
You can pass both negative and positive values as parameters to the `SfPopup.ShowRelativeToView(View, RelativePosition, x-position, y-position)`. The popup will be positioned by considering the relative position as (0, 0) the center point. For example, if you have set the `RelativePosition` as `PopupRelativePosition.AlignBottomRight` and `RelativeView` as a button, bottom right corner of the button will be considered as the 0, 0 point and a negative x-position value will place the popup to the left of that point and a positive x-position value will place the popup to the right of that point. The same applies for y-position also.
235
+
You can pass both negative and positive values as parameters to the [SfPopup.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_). The popup will be positioned by considering the relative position as (0, 0) the center point. For example, if you have set the [RelativePosition](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_RelativePosition) as [PopupRelativePosition.AlignBottomRight](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.PopupRelativePosition.html#Syncfusion_Maui_Toolkit_Popup_PopupRelativePosition_AlignBottomRight) and [RelativeView](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_RelativeView) as a button, bottom right corner of the button will be considered as the 0, 0 point and a negative x-position value will place the popup to the left of that point and a positive x-position value will place the popup to the right of that point. The same applies for y-position also.
236
236
237
237
### Show relative to view in MVVM
238
238
239
-
To open the SfPopup relative to a view in MVVM assign values to the `SfPopup.RelativeView` and `SfPopup.RelativePosition` properties and use the `SfPopup.IsOpen` property to open or close the popup using binding.
240
-
The `AbsoluteX` and `AbsoluteY` are used to display popup at the specified coordinates when positioning it relatively to the specified `RelativeView` based on the `RelativePosition`.
239
+
To open the SfPopup relative to a view in MVVM assign values to the [SfPopup.RelativeView](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_RelativeView) and [SfPopup.RelativePosition](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_RelativePosition) properties and use the [SfPopup.IsOpen](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_IsOpen) property to open or close the popup using binding.
240
+
The [AbsoluteX](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_AbsoluteX) and [AbsoluteY](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_AbsoluteY) are used to display popup at the specified coordinates when positioning it relatively to the specified [RelativeView](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_RelativeView) based on the [RelativePosition](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_RelativePosition).
@@ -304,7 +304,7 @@ public class ViewModel : INotifyPropertyChanged
304
304
305
305
## Close the popup automatically after timeout
306
306
307
-
To close a popup automatically after a specified delay, you can use the `AutoCloseDuration` property, which allows you to give the duration in milliseconds for the popup to automatically close itself without any user interaction.
307
+
To close a popup automatically after a specified delay, you can use the [AutoCloseDuration](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_AutoCloseDuration) property, which allows you to give the duration in milliseconds for the popup to automatically close itself without any user interaction.
308
308
309
309
{% tabs %}
310
310
{% highlight xaml hl_lines="3" %}
@@ -324,7 +324,7 @@ popup.IsOpen = true;
324
324
325
325
## Position the popup over the action bar
326
326
327
-
The SfPopup can be positioned without considering the action bar by using the `SfPopup.IgnoreActionBar` property. When set to true, this allows the popup to be positioned over the action bar without any constraints.
327
+
The SfPopup can be positioned without considering the action bar by using the [SfPopup.IgnoreActionBar](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_IgnoreActionBar) property. When set to true, this allows the popup to be positioned over the action bar without any constraints.
328
328
329
329
{% tabs %}
330
330
{% highlight xaml hl_lines="2" %}
@@ -341,15 +341,15 @@ popup.Show(0,0);
341
341
342
342

343
343
344
-
If `IgnoreActionBar` is set to false, the popup positioning will take the action bar into account, ensuring it does not overlap.
344
+
If [IgnoreActionBar](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_IgnoreActionBar) is set to false, the popup positioning will take the action bar into account, ensuring it does not overlap.
345
345
346
346
This feature is useful when you want to display the popup freely across the screen, including over the action bar.
347
347
348
348
## How to
349
349
350
350
### Returning result
351
351
352
-
The `ShowAsync()` method of the Popup allows you to display the popup and returns `true` if the user closes it using the accept button, or `false` otherwise.
352
+
The [ShowAsync()](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_ShowAsync) method of the Popup allows you to display the popup and returns `true` if the user closes it using the accept button, or `false` otherwise.
353
353
354
354
{% tabs %}
355
355
{% highlight xaml %}
@@ -388,7 +388,7 @@ public partial class MainPage : ContentPage
388
388
{% endhighlight %}
389
389
{% endtabs %}
390
390
391
-
The `Show(string title, string message, string acceptText, string declineText)` static method of the Popup allows you to display the popup and returns `true` if the user closes it using the accept button, or `false` otherwise.
391
+
The [Show(string title, string message, string acceptText, string declineText)](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_Show_System_String_System_String_System_String_System_String_System_Int32_) static method of the Popup allows you to display the popup and returns `true` if the user closes it using the accept button, or `false` otherwise.
`SfPopup.IsOpen` is a bindable property and hence can be bind to any property and based on its value the popup will open or close. In the following code example, we have bound the `IsOpen` property with the `IsToggled` property of the switch, and the popup will be opened or closed as the switch toggles.
693
+
[SfPopup.IsOpen](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_IsOpen) is a bindable property and hence can be bind to any property and based on its value the popup will open or close. In the following code example, we have bound the [IsOpen](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Popup.SfPopup.html#Syncfusion_Maui_Toolkit_Popup_SfPopup_IsOpen) property with the `IsToggled` property of the switch, and the popup will be opened or closed as the switch toggles.
0 commit comments