Ziad Mansour
Ziad Mansour

Reputation: 15

Create custom popup message in WPF C# App

How to create in WPF C# App a customized pop up window (Message Box) like windows 8/ windows store apps popups, is it feasible to create it? I need to have the design as the attached image

Popup Message Image

I'm using Devexpress for WPF as third parties controls. thanks

Upvotes: 1

Views: 1786

Answers (3)

timdar
timdar

Reputation: 51

With DevExpress you are probably looking at either:

  • WinUIMessageBox
  • WinUIDialogWindow

Both can be found at this link.

Upvotes: 1

Brendon
Brendon

Reputation: 1259

I think you may want to use the FlyoutControl for this. DevExpress has a nice example of using it in a modal form in their How To: Create a Modal Message Box Flyout documentation.

enter image description here

Upvotes: 0

Bizhan
Bizhan

Reputation: 17085

Yes, put everything in a grid followed by another grid containing the message box. The rest is up to you to show and hide the message box and style it. The grid with the background makes everything un-interactable.

<Grid>
    <!--Everything-->
    <Grid Background="#6666">
        <Border Background="White" VerticalAlignment="Center" Padding="10">
            <StackPanel HorizontalAlignment="Center" MinWidth="300">
                <TextBlock Text="My Title"/>
                <WrapPanel HorizontalAlignment="Right">
                    <Button Content="Ok"/>
                    <Button Content="Cancel"/>
                </WrapPanel>
            </StackPanel>
        </Border>
    </Grid>
</Grid>

Upvotes: 2

Related Questions