Tosker

ContactBook Part 7 - DetailsView

Jul 10th, 2018
886
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.57 KB | None | 0 0
  1. <UserControl x:Class="SimpleContactBook.Views.DetailsView"
  2.             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5.             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6.             xmlns:local="clr-namespace:SimpleContactBook.Views"
  7.             mc:Ignorable="d"
  8.             d:DesignHeight="1200" d:DesignWidth="450">
  9.     <Grid>
  10.         <Grid.RowDefinitions>
  11.             <RowDefinition/>
  12.             <RowDefinition/>
  13.             <RowDefinition/>
  14.             <RowDefinition/>
  15.             <RowDefinition/>
  16.         </Grid.RowDefinitions>
  17.  
  18.         <Grid Grid.Row="0">
  19.             <Grid.ColumnDefinitions>
  20.                 <ColumnDefinition/>
  21.                 <ColumnDefinition Width="100"/>
  22.             </Grid.ColumnDefinitions>
  23.  
  24.             <StackPanel Grid.Column="0" HorizontalAlignment="Left"
  25.                        Margin="5">
  26.                 <StackPanel Orientation="Horizontal">
  27.                     <StackPanel HorizontalAlignment="Center">
  28.                         <Label Content="{Binding SelectedContact.Name,FallbackValue=NULL}"
  29.                               HorizontalAlignment="Center"
  30.                               FontSize="24"/>
  31.                     </StackPanel>
  32.                     <CheckBox Content="isFavorite"/>
  33.                 </StackPanel>
  34.                 <Grid Height="125" Width="125">
  35.                     <Image Height="125" Width="125"
  36.                           Source="{Binding SelectedContact.ImagePath,
  37.                        FallbackValue={StaticResource DefaultContactImage},
  38.                        TargetNullValue={StaticResource DefaultContactImage}}"/>
  39.  
  40.                     <Button Style="{StaticResource MenuIconButton}" Background="{StaticResource GloomyPurple}"
  41.                            VerticalAlignment="Bottom" HorizontalAlignment="Right"
  42.                            Foreground="Black" FontWeight="DemiBold">
  43.                         Browse
  44.                     </Button>
  45.                 </Grid>
  46.             </StackPanel>
  47.  
  48.             <StackPanel Grid.Column="1" VerticalAlignment="Bottom" Orientation="Horizontal">
  49.                 <Button Style="{StaticResource MenuIconButton}" Background="{StaticResource MaximumBlueGreen}"
  50.                        Width="90" Height="40" Margin="5">
  51.                     <Button.Content>
  52.                         <StackPanel Orientation="Horizontal">
  53.                             <Image Source="pack://siteoforigin:,,,/Resources/saveIcon.png" />
  54.                             <Label FontWeight="Bold">Save</Label>
  55.                         </StackPanel>
  56.                     </Button.Content>
  57.                 </Button>
  58.             </StackPanel>
  59.         </Grid>
  60.        
  61.         <!-- Phone Details -->
  62.         <StackPanel Grid.Row="1" Margin="5">
  63.             <StackPanel>
  64.                 <Border Style="{StaticResource DetailBorder}">
  65.                     <Label FontWeight="Bold" Foreground="#FFF5F7F9" Content="Phone"/>
  66.                 </Border>
  67.  
  68.                 <StackPanel>
  69.                     <!-- Home Numbers-->
  70.                     <Label Style="{StaticResource DetailLabel}" Content="Home"/>
  71.                     <Label Style="{StaticResource ContentLabel}" Content="{Binding SelectedContact.PhoneNumbers[0], FallbackValue=NULL}"/>
  72.  
  73.                     <!-- Cell Numbers-->
  74.                     <Label Style="{StaticResource DetailLabel}"  Content="Cell"/>
  75.                     <Label Style="{StaticResource ContentLabel}"  Content="{Binding SelectedContact.PhoneNumbers[1], FallbackValue=NULL}"/>
  76.                 </StackPanel>
  77.             </StackPanel>
  78.         </StackPanel>
  79.  
  80.         <!-- Phone Details -->
  81.         <StackPanel Grid.Row="2" Margin="5">
  82.             <StackPanel>
  83.                 <Border Style="{StaticResource DetailBorder}">
  84.                     <Label FontWeight="Bold" Foreground="#FFF5F7F9" Content="Emails"/>
  85.                 </Border>
  86.  
  87.                 <StackPanel>
  88.                     <!-- Home Numbers-->
  89.                     <Label Style="{StaticResource DetailLabel}" Content="Personal"/>
  90.                     <Label Style="{StaticResource ContentLabel}" Content="{Binding SelectedContact.Emails[0], FallbackValue=NULL}"/>
  91.  
  92.                     <!-- Cell Numbers-->
  93.                     <Label Style="{StaticResource DetailLabel}"  Content="Work"/>
  94.                     <Label Style="{StaticResource ContentLabel}"  Content="{Binding SelectedContact.Emails[1], FallbackValue=NULL}"/>
  95.                 </StackPanel>
  96.             </StackPanel>
  97.         </StackPanel>
  98.  
  99.         <!-- Location Details -->
  100.         <StackPanel Grid.Row="3" Margin="5">
  101.             <StackPanel>
  102.                 <Border Style="{StaticResource DetailBorder}">
  103.                     <Label FontWeight="Bold" Foreground="#FFF5F7F9" Content="Locations"/>
  104.                 </Border>
  105.  
  106.                 <StackPanel>
  107.                     <!-- Home Numbers-->
  108.                     <Label Style="{StaticResource DetailLabel}" Content="Home"/>
  109.                     <Label Style="{StaticResource ContentLabel}" Content="{Binding SelectedContact.Locations[0], FallbackValue=NULL}"/>
  110.  
  111.                     <!-- Cell Numbers-->
  112.                     <Label Style="{StaticResource DetailLabel}"  Content="Work"/>
  113.                     <Label Style="{StaticResource ContentLabel}"  Content="{Binding SelectedContact.Locations[1], FallbackValue=NULL}"/>
  114.                 </StackPanel>
  115.             </StackPanel>
  116.         </StackPanel>
  117.     </Grid>
  118. </UserControl>
Advertisement
Add Comment
Please, Sign In to add comment