Back to Devexpress

DXPopup.ScrimColor Property

mobilecontrols-devexpress-dot-xamarinforms-dot-popup-dot-dxpopup-254f641a.md

latest2.1 KB
Original Source

DXPopup.ScrimColor Property

Gets or sets the scrim color and transparency.

Namespace : DevExpress.XamarinForms.Popup

Assembly : DevExpress.XamarinForms.Editors.dll

NuGet Package : DevExpress.XamarinForms.Editors

Declaration

csharp
public Color ScrimColor { get; set; }

Property Value

TypeDescription
Color

Scrim color and transparency.

|

Remarks

Set the AllowScrim property to true to enable a scrim and use the Popup as a modal window (which blocks the rest of the UI until the Popup is addressed). You can apply an overlay color (transparent, if required) outside the Popup to indicate that a user must interact with the Popup in order to return to the underlying UI. The ScrimColor property allows you to customize the scrim color and transparency.

Example

This example shows how to specify the scrim to block interaction with the rest of the UI until a user taps the button within the Popup to close it.

xaml
<dxp:DXPopup x:Name="popup"
             AllowScrim="True"
             ScrimColor="#b3adb9ce">
    <StackLayout WidthRequest="200">
        <Label Text="This is the DevExpress Xamarin.Forms Popup component used as a modal window."
               Margin="10, 10"/>
        <Button Text="Close the popup" Clicked="ClosePopup_Clicked"/>
    </StackLayout>
</dxp:DXPopup>
csharp
void ClosePopup_Clicked(System.Object sender, System.EventArgs e) {
    popup.IsOpen = false;
}

See Also

DXPopup Class

DXPopup Members

DevExpress.XamarinForms.Popup Namespace