Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Views/ShellView.xaml */
- <UserControl x:Class="DLGCContactLog_Caliburn.Views.ShellView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:cal="http://www.caliburnproject.org"
- xmlns:vm="cli-namespace:DLGCContactLog_Caliburn.ViewModels"
- xmlns:view="cli-namespace:DLGCContactLog_Caliburn.Views"
- mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="600" >
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="Skins/DefaultSkin.xaml" />
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
- <DockPanel>
- <Border DockPanel.Dock="Top" Padding="10" Margin="4" CornerRadius="5" Background="{StaticResource DefaultBlueBrush}">
- <TextBlock Text="DLGC Contact Log" Foreground="White" FontWeight="Bold" FontSize="16" />
- </Border>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition />
- <ColumnDefinition Width="30*"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition />
- </Grid.RowDefinitions>
- <Expander Padding="10" Margin="4" BorderBrush="DarkGray" ExpandDirection="Right" Grid.Row="0" Grid.Column="0" IsExpanded="True">
- <Expander.Header>
- <TextBlock Text="Control Panel" FontSize="14" FontWeight="Bold">
- <TextBlock.LayoutTransform>
- <RotateTransform Angle="90" />
- </TextBlock.LayoutTransform>
- </TextBlock>
- </Expander.Header>
- <DockPanel x:Name="CallerPanel" VerticalAlignment="Bottom">
- <ListBox x:Name="Callers" VerticalContentAlignment="Stretch" VerticalAlignment="Top" Height="500" >
- <ListBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding DisplayName}"/>
- <!-- ToDo: make ^this^ a CallerView -->
- <!-- <view:CallerView /> -->
- </DataTemplate>
- </ListBox.ItemTemplate>
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel Orientation="Vertical" />
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- </ListBox>
- <StackPanel Orientation="Horizontal" x:Name="pnlButtons" DockPanel.Dock="Bottom">
- <Button x:Name="ShowCallerDetails" VerticalAlignment="Bottom"
- Content="Caller Details"
- DockPanel.Dock="Left"
- cal:Message.Attach="[Event Click] = [Action ShowCallerDetails]" />
- <Button Visibility="Visible" Content="Add Caller" Command="{Binding AddCallerCommand}" VerticalAlignment="Bottom"/>
- </StackPanel>
- </DockPanel>
- </Expander>
- <!-- TabControl for CallerDetails and CallDetails TabViews -->
- <TabControl x:Name="Items" Margin="4 4 4 4" Grid.Row="0" Grid.Column="1" IsSynchronizedWithCurrentItem="True" Grid.ColumnSpan="2">
- <TabControl.ItemTemplate>
- <DataTemplate>
- <DockPanel>
- <Button x:Name="Close" Content="X" DockPanel.Dock="Right" FontSize="8" Focusable="False" FontWeight="Bold" Margin="10 0 -10 0" />
- <!-- <Button Command="{Binding Path=Close}" Content="X" DockPanel.Dock="Right" FontSize="8" Focusable="False" FontWeight="Bold" Margin="10 0 -10 0" /> -->
- <ContentPresenter Content="{Binding DisplayName}" />
- </DockPanel>
- </DataTemplate>
- </TabControl.ItemTemplate>
- </TabControl>
- </Grid>
- </DockPanel>
- </UserControl>
- // end Views/ShellView.xaml
- /* Views/CallerDetailsView.xaml */
- <UserControl x:Class="DLGCContactLog_Caliburn.Views.CallerDetailsView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- mc:Ignorable="d" d:DesignHeight="200" d:DesignWidth="300">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="Skins/DefaultSkin.xaml" />
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Border Padding="5" Margin="4" CornerRadius="5" Background="{StaticResource DefaultBlueBrush}">
- <TextBlock Text="Caller Details" Foreground="Wheat" FontWeight="Bold" FontSize="12" />
- </Border>
- <GroupBox Header="Caller" Grid.Row="1" DockPanel.Dock="Bottom">
- <Grid Margin="4">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="6" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Label Grid.Row="0" Grid.Column="0" Content="Given Name:" HorizontalAlignment="Right" />
- <!-- <TextBox Grid.Row="0" Grid.Column="2" Text="{Binding Caller.GivenNames, UpdateSourceTrigger=PropertyChanged}" /> -->
- <TextBox Grid.Row="0" Grid.Column="2" x:Name="GivenNames"/>
- <Label Grid.Row="1" Grid.Column="0" Content="Surname:" HorizontalAlignment="Right" />
- <!-- <TextBox Grid.Row="1" Grid.Column="2" Text="{Binding Surname, UpdateSourceTrigger=PropertyChanged}" /> -->
- <TextBox Grid.Row="1" Grid.Column="2" x:Name="Caller_Surname" Text="{Binding Surname}" />
- <!-- Haven't bothered to try to get the below working. Once I can get GivenNames and Surname working, I'll have another go -->
- <Label Grid.Row="2" Grid.Column="0" Content="Phone Number:" HorizontalAlignment="Right" />
- <TextBox Grid.Row="2" Grid.Column="2" Text="{Binding Caller.Phone, UpdateSourceTrigger=PropertyChanged}" />
- <Label Grid.Row="3" Grid.Column="0" Content="Email:" HorizontalAlignment="Right" />
- <TextBox Grid.Row="3" Grid.Column="2" Text="{Binding Caller.EmailAddress, UpdateSourceTrigger=PropertyChanged}" />
- <Label Grid.Row="4" Grid.Column="0" Content="Organisation:" HorizontalAlignment="Right" />
- <TextBox Grid.Row="4" Grid.Column="2" Text="{Binding Caller.CallingOrganisation.OrganisationName, UpdateSourceTrigger=PropertyChanged}" />
- <!--<Button Grid.Row="5" Grid.Column="0" Content="Update" Command="{Binding UpdateCommand}" />-->
- </Grid>
- </GroupBox>
- <GroupBox Header="Calls" Grid.Row="2">
- <!-- ^This^ too can wait. -->
- <ContentControl x:Name="Calls" />
- <!-- <ContentControl Content="{Binding Calls}" />-->
- </GroupBox>
- </Grid>
- </UserControl>
- // end Views/CallerDetailsView.xaml
- /* Views/TabView.xaml */
- <UserControl x:Class="DLGCContactLog_Caliburn.Views.TabView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
- <StackPanel>
- </StackPanel>
- </UserControl>
- // end Views/TabView.xaml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement