Advertisement
Guest User

OtherXaml

a guest
Aug 29th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 8.12 KB | None | 0 0
  1. /*  Views/ShellView.xaml     */
  2.  
  3. <UserControl x:Class="DLGCContactLog_Caliburn.Views.ShellView"
  4.             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  5.             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  6.             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7.             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8.             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  9.             xmlns:cal="http://www.caliburnproject.org"
  10.             xmlns:vm="cli-namespace:DLGCContactLog_Caliburn.ViewModels"
  11.             xmlns:view="cli-namespace:DLGCContactLog_Caliburn.Views"
  12.             mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="600" >
  13.  
  14.   <UserControl.Resources>
  15.     <ResourceDictionary>
  16.       <ResourceDictionary.MergedDictionaries>
  17.         <ResourceDictionary Source="Skins/DefaultSkin.xaml" />
  18.       </ResourceDictionary.MergedDictionaries>
  19.     </ResourceDictionary>
  20.   </UserControl.Resources>
  21.  
  22.   <DockPanel>
  23.     <Border DockPanel.Dock="Top" Padding="10" Margin="4" CornerRadius="5" Background="{StaticResource DefaultBlueBrush}">
  24.       <TextBlock Text="DLGC Contact Log" Foreground="White" FontWeight="Bold" FontSize="16" />
  25.     </Border>
  26.  
  27.     <Grid>
  28.       <Grid.ColumnDefinitions>
  29.         <ColumnDefinition Width="auto" />
  30.         <ColumnDefinition />
  31.         <ColumnDefinition Width="30*"/>
  32.       </Grid.ColumnDefinitions>
  33.       <Grid.RowDefinitions>
  34.         <RowDefinition  />
  35.       </Grid.RowDefinitions>
  36.       <Expander Padding="10" Margin="4" BorderBrush="DarkGray" ExpandDirection="Right" Grid.Row="0" Grid.Column="0" IsExpanded="True">
  37.         <Expander.Header>
  38.           <TextBlock Text="Control Panel" FontSize="14" FontWeight="Bold">
  39.             <TextBlock.LayoutTransform>
  40.               <RotateTransform Angle="90" />
  41.             </TextBlock.LayoutTransform>
  42.           </TextBlock>
  43.         </Expander.Header>
  44.  
  45.         <DockPanel x:Name="CallerPanel" VerticalAlignment="Bottom">
  46.           <ListBox  x:Name="Callers" VerticalContentAlignment="Stretch" VerticalAlignment="Top" Height="500" >
  47.             <ListBox.ItemTemplate>
  48.               <DataTemplate>
  49.                 <TextBlock Text="{Binding DisplayName}"/>
  50.                 <!-- ToDo:  make ^this^ a CallerView  -->
  51.                 <!-- <view:CallerView />  -->
  52.               </DataTemplate>
  53.             </ListBox.ItemTemplate>
  54.             <ListBox.ItemsPanel>
  55.               <ItemsPanelTemplate>
  56.                 <StackPanel Orientation="Vertical" />
  57.               </ItemsPanelTemplate>
  58.             </ListBox.ItemsPanel>
  59.           </ListBox>
  60.  
  61.           <StackPanel Orientation="Horizontal" x:Name="pnlButtons" DockPanel.Dock="Bottom">
  62.             <Button x:Name="ShowCallerDetails" VerticalAlignment="Bottom"
  63.                Content="Caller Details"
  64.                DockPanel.Dock="Left"
  65.                cal:Message.Attach="[Event Click] = [Action ShowCallerDetails]" />
  66.             <Button Visibility="Visible" Content="Add Caller" Command="{Binding AddCallerCommand}" VerticalAlignment="Bottom"/>
  67.           </StackPanel>
  68.         </DockPanel>
  69.       </Expander>
  70.      
  71.       <!-- TabControl for CallerDetails and CallDetails TabViews  -->
  72.       <TabControl x:Name="Items" Margin="4 4 4 4" Grid.Row="0" Grid.Column="1" IsSynchronizedWithCurrentItem="True" Grid.ColumnSpan="2">
  73.         <TabControl.ItemTemplate>
  74.           <DataTemplate>
  75.             <DockPanel>
  76.               <Button x:Name="Close" Content="X" DockPanel.Dock="Right" FontSize="8" Focusable="False" FontWeight="Bold" Margin="10 0 -10 0" />
  77.               <!-- <Button Command="{Binding Path=Close}" Content="X" DockPanel.Dock="Right" FontSize="8" Focusable="False" FontWeight="Bold" Margin="10 0 -10 0" /> -->
  78.               <ContentPresenter Content="{Binding DisplayName}" />
  79.             </DockPanel>
  80.           </DataTemplate>
  81.         </TabControl.ItemTemplate>
  82.       </TabControl>
  83.     </Grid>
  84.   </DockPanel>
  85. </UserControl>
  86.  
  87. // end Views/ShellView.xaml
  88.  
  89.  
  90.  
  91. /*  Views/CallerDetailsView.xaml    */
  92. <UserControl x:Class="DLGCContactLog_Caliburn.Views.CallerDetailsView"
  93.             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  94.             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  95.             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  96.             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  97.             mc:Ignorable="d" d:DesignHeight="200" d:DesignWidth="300">
  98.              
  99.   <UserControl.Resources>
  100.     <ResourceDictionary>
  101.       <ResourceDictionary.MergedDictionaries>
  102.         <ResourceDictionary Source="Skins/DefaultSkin.xaml" />
  103.       </ResourceDictionary.MergedDictionaries>
  104.     </ResourceDictionary>
  105.   </UserControl.Resources>
  106.  
  107.   <Grid>
  108.     <Grid.RowDefinitions>
  109.       <RowDefinition Height="Auto" />
  110.       <RowDefinition Height="Auto" />
  111.       <RowDefinition Height="*" />
  112.     </Grid.RowDefinitions>
  113.    
  114.     <Border Padding="5" Margin="4" CornerRadius="5" Background="{StaticResource DefaultBlueBrush}">
  115.       <TextBlock Text="Caller Details" Foreground="Wheat" FontWeight="Bold" FontSize="12" />
  116.     </Border>
  117.    
  118.     <GroupBox Header="Caller" Grid.Row="1" DockPanel.Dock="Bottom">
  119.       <Grid Margin="4">
  120.         <Grid.ColumnDefinitions>
  121.           <ColumnDefinition Width="Auto" />
  122.           <ColumnDefinition Width="6" />
  123.           <ColumnDefinition Width="*" />
  124.         </Grid.ColumnDefinitions>
  125.         <Grid.RowDefinitions>
  126.           <RowDefinition Height="Auto" />
  127.           <RowDefinition Height="Auto" />
  128.           <RowDefinition Height="Auto" />
  129.           <RowDefinition Height="Auto" />
  130.           <RowDefinition Height="Auto" />
  131.           <RowDefinition Height="Auto" />
  132.           <RowDefinition Height="Auto" />
  133.         </Grid.RowDefinitions>
  134.    
  135.         <Label Grid.Row="0" Grid.Column="0" Content="Given Name:" HorizontalAlignment="Right" />
  136.         <!-- <TextBox Grid.Row="0" Grid.Column="2" Text="{Binding Caller.GivenNames, UpdateSourceTrigger=PropertyChanged}"  /> -->
  137.         <TextBox Grid.Row="0" Grid.Column="2" x:Name="GivenNames"/>
  138.         <Label Grid.Row="1" Grid.Column="0" Content="Surname:" HorizontalAlignment="Right" />
  139.         <!-- <TextBox Grid.Row="1" Grid.Column="2" Text="{Binding Surname, UpdateSourceTrigger=PropertyChanged}" /> -->
  140.         <TextBox Grid.Row="1" Grid.Column="2" x:Name="Caller_Surname" Text="{Binding Surname}" />
  141.        
  142.         <!-- Haven't bothered to try to get the below working.  Once I can get GivenNames and Surname working, I'll have another go   -->
  143.         <Label Grid.Row="2" Grid.Column="0" Content="Phone Number:" HorizontalAlignment="Right" />
  144.         <TextBox Grid.Row="2" Grid.Column="2" Text="{Binding Caller.Phone, UpdateSourceTrigger=PropertyChanged}" />
  145.         <Label Grid.Row="3" Grid.Column="0" Content="Email:" HorizontalAlignment="Right" />
  146.         <TextBox Grid.Row="3" Grid.Column="2" Text="{Binding Caller.EmailAddress, UpdateSourceTrigger=PropertyChanged}" />
  147.         <Label Grid.Row="4" Grid.Column="0" Content="Organisation:" HorizontalAlignment="Right" />
  148.         <TextBox Grid.Row="4" Grid.Column="2" Text="{Binding Caller.CallingOrganisation.OrganisationName, UpdateSourceTrigger=PropertyChanged}" />
  149.         <!--<Button Grid.Row="5" Grid.Column="0" Content="Update" Command="{Binding UpdateCommand}" />-->
  150.       </Grid>
  151.     </GroupBox>
  152.    
  153.     <GroupBox Header="Calls" Grid.Row="2">
  154.     <!--  ^This^ too can wait.    -->
  155.       <ContentControl x:Name="Calls" />
  156.       <!-- <ContentControl Content="{Binding Calls}" />-->
  157.     </GroupBox>
  158.   </Grid>
  159. </UserControl>
  160.  
  161. // end Views/CallerDetailsView.xaml
  162.  
  163.  
  164. /*   Views/TabView.xaml    */
  165. <UserControl x:Class="DLGCContactLog_Caliburn.Views.TabView"
  166.             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  167.             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  168.             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  169.             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  170.             mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
  171.   <StackPanel>
  172.    
  173.   </StackPanel>
  174. </UserControl>
  175.  
  176. // end Views/TabView.xaml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement