Create custom popup message in WPF C# App

1.5k Views Asked by At

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

3

There are 3 best solutions below

0
Bizhan On BEST ANSWER

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>
0
Brendon On

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

0
timdar On

With DevExpress you are probably looking at either:

  • WinUIMessageBox
  • WinUIDialogWindow

Both can be found at this link.