Search code examples
c#wpfwindows-8popupdevexpress

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


Solution

  • 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>