Friday, June 13, 2014

CHAPTER 2 EX 02 Peter Appointment App

EX 2 ) Peter is working as a user interface designer at GlobalTech Inc.,California.He has been assigned the task to design an interface of an app that can be used for managing appointments.This app should allow user to add ,view,and delete appointments.For this,Peter has been told to design the user interface of the app,as shown  in the following figure.
Help peter to design the ui of the preceding app.

Ans 2) Paste in MainPage.xaml


<Page
    x:Class="AppointmentApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:AppointmentApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.Resources>
        <DataTemplate x:Key="No">
            <Grid/>
        </DataTemplate>
    </Page.Resources>

    <Viewbox>
        <Grid Background="Black" HorizontalAlignment="Center" VerticalAlignment="Center" Height="1044">
            <TextBlock HorizontalAlignment="Left" Margin="1385,123,0,0" Text="Month" VerticalAlignment="Top" Style="{StaticResource GroupHeaderTextStyle}"/>
            <ComboBox x:Name="cboxmonth" HorizontalAlignment="Left" Margin="1472,128,0,0" VerticalAlignment="Top" Width="174" SelectionChanged="cboxmonth_SelectionChanged"/>
            <TextBlock HorizontalAlignment="Left" Margin="1662,123,0,0" Text="Year" VerticalAlignment="Top" Style="{StaticResource GroupHeaderTextStyle}" Width="55"/>
            <ComboBox x:Name="cboxYear" HorizontalAlignment="Left" Margin="1727,128,0,0" VerticalAlignment="Top" Width="108"/>
            <Canvas x:Name="cnvsCalander" HorizontalAlignment="Left" Height="275" Margin="1381,182,-4,0" VerticalAlignment="Top" Width="481" Background="#FFC5C5C5"/>
            <Button x:Name="bttnAppointments" BorderThickness="0" Background="Blue"             HorizontalAlignment="Left" Margin="1377,482,-4,0" VerticalAlignment="Top" IsDoubleTapEnabled="True" Height="36" Width="485" Content="APPOINTMENTS" Click="bttnAppointments_Click" FontSize="18" />
            <Button x:Name="bttnAppointments_Copy" BorderThickness="0" Background="Blue"    FontSize="18"         HorizontalAlignment="Left" Margin="1377,79,-4,0" VerticalAlignment="Top" IsDoubleTapEnabled="True" Height="36" Width="485" RenderTransformOrigin="0.49,-6.291" Content="CALENDAR" />
            <TextBlock HorizontalAlignment="Left" Margin="10,88,0,0" TextWrapping="Wrap" Text="Start Date" VerticalAlignment="Top" Height="27" Width="192" FontSize="30" TextAlignment="Left"/>
            <TextBlock HorizontalAlignment="Left" Margin="303,82,0,0" TextWrapping="Wrap" Text="Please Select a Date" VerticalAlignment="Top" Height="33" Width="352" FontSize="30" TextAlignment="Center"/>
            <TextBlock HorizontalAlignment="Left" Margin="10,160,0,0" TextWrapping="Wrap" Text="Start Time" VerticalAlignment="Top" Height="32" Width="192" TextAlignment="Left" FontSize="30"/>
            <TextBlock HorizontalAlignment="Left" Margin="323,157,0,0" TextWrapping="Wrap" Text="Hour" VerticalAlignment="Top" Height="35" RenderTransformOrigin="-6.853,-1.881" Width="102" TextAlignment="Center" FontSize="30" FontFamily="TimesNewRoman"/>
            <ComboBox HorizontalAlignment="Left" Margin="430,157,0,0" VerticalAlignment="Top" Width="120"/>
            <TextBlock HorizontalAlignment="Left" Margin="593,154,0,0" TextWrapping="Wrap" Text="Minute" VerticalAlignment="Top" Height="35" RenderTransformOrigin="-6.853,-1.881" Width="102" TextAlignment="Center" FontSize="30" FontFamily="TimesNewRoman"/>
            <ComboBox HorizontalAlignment="Left" Margin="715,154,0,0" VerticalAlignment="Top" Width="120"/>
            <ComboBox HorizontalAlignment="Left" Margin="866,154,0,0" VerticalAlignment="Top" Width="120"/>
            <TextBlock HorizontalAlignment="Left" Margin="10,255,0,0" TextWrapping="Wrap" Text="Event Name" VerticalAlignment="Top" FontSize="30" Width="192"/>
            <ListBox HorizontalAlignment="Left" Height="36" Margin="337,255,0,0" VerticalAlignment="Top" Width="679"/>
            <TextBlock HorizontalAlignment="Left" Margin="10,366,0,0" TextWrapping="Wrap" Text="Duration In Hours" VerticalAlignment="Top" Height="37" Width="244" FontSize="30"/>
            <ListBox HorizontalAlignment="Left" Height="36" Margin="337,367,0,0" VerticalAlignment="Top" Width="679"/>
            <TextBlock HorizontalAlignment="Left" Margin="10,460,0,0" TextWrapping="Wrap" Text="Description" VerticalAlignment="Top" Height="37" Width="244" FontSize="30"/>
            <ListBox HorizontalAlignment="Left" Height="170" Margin="337,460,0,0" VerticalAlignment="Top" Width="679"/>
            <TextBlock HorizontalAlignment="Left" Margin="10,732,0,0" TextWrapping="Wrap" Text="All Day Event" VerticalAlignment="Top" Height="37" Width="244" FontSize="30"/>
            <ToggleSwitch HorizontalAlignment="Left" Margin="337,719,0,0" VerticalAlignment="Top" Width="263" Height="50" FontSize="24"/>
            <ToggleButton Content="Add" HorizontalAlignment="Left" Margin="10,961,0,0" VerticalAlignment="Top" Height="59" Width="132" FontSize="30"/>
            <ToggleButton Content="Delete" HorizontalAlignment="Left" Margin="160,961,0,0" VerticalAlignment="Top" Height="59" Width="132" FontSize="30"/>
            <Button x:Name="bttnAppointments_Copy1" BorderThickness="0" Background="Blue"    FontSize="25"         HorizontalAlignment="Left" Margin="10,11,0,0" VerticalAlignment="Top" IsDoubleTapEnabled="True" Height="46" Width="1838" RenderTransformOrigin="0.49,-6.291" Content="New Appointment" Click="bttnAppointments_Copy1_Click"  />
            <ListBox HorizontalAlignment="Left" Height="261" Margin="1381,546,-4,0" VerticalAlignment="Top" Width="481"/>


        </Grid>
    </Viewbox>
</Page>



1 comment: