0

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.

3
Contributors
2
Replies
6
Views
3 Years
Discussion Span
Last Post by MarkAMalo
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.