I have been searching google but I did not find how to display a message in C# win store app. Actually I have been developing a app in which user will input. I have built rgex. When a text box is empty & user click on validate button it would display a message to prompt the user to first input data then he has to click on vaslidate.

Microsoft recommends that you do not create "dialog boxes" as we do in "normal" windows programming. They have some specifics about what a dialog box should look like in Modern apps.

I believe there might be some built in ones in Calisto, however, I typically use a very simple (although configurable) UserControl with a solid color (usually the blue windows uses) as the main background to the dialog with opacity set on the upper and lower borders.

For example:

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="400"/>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Rectangle Grid.Row="0" Grid.RowSpan="3" Fill="Black" Opacity=".5" />
        <Grid Grid.Row="1" Background="DarkSlateGray">
            <TextBlock TextWrapping="Wrap"  x:Name="txtText" Margin="25,100,25,0" VerticalAlignment="Top"/>
            <Button x:Name="btnOk" Height="80"  Margin="50,50,50,50" Click="btnOk_Click" VerticalAlignment="Bottom">Ok</Button>
        </Grid>
    </Grid>

Hope this helps.

Mark A. Malo

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.