PageRenderTime 25ms CodeModel.GetById 0ms RepoModel.GetById 1ms app.codeStats 0ms

/TimeSheetReporting/TimeSheetReporting/Views/Home.xaml

#
XAML | 87 lines | 83 code | 4 blank | 0 comment | 0 complexity | a857cef5e9438e72f50d9804b9a9f2be MD5 | raw file
  1. <navigation:Page x:Class="TimeSheetReporting.Home"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
  6. xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
  7. xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
  8. xmlns:riaControl="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Ria"
  9. xmlns:src="clr-namespace:TimeSheetReporting.Helper"
  10. mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
  11. Title="Home"
  12. Style="{StaticResource PageStyle}">
  13. <Grid x:Name="LayoutRoot">
  14. <Grid.Resources>
  15. <src:MemberListProvider x:Key="memberListProvider" />
  16. <src:ProjectListProvider x:Key="projectListProvider" />
  17. </Grid.Resources>
  18. <Border Style="{StaticResource ContentBoxStyle}">
  19. <Grid>
  20. <data:DataGrid x:Name="gridEfforts" AutoGenerateColumns="False" Margin="0,0,0,30" >
  21. <data:DataGrid.Columns>
  22. <data:DataGridTemplateColumn Header="Date">
  23. <data:DataGridTemplateColumn.CellTemplate>
  24. <DataTemplate>
  25. <controls:DatePicker SelectedDate="{Binding Date,Mode=TwoWay}"/>
  26. </DataTemplate>
  27. </data:DataGridTemplateColumn.CellTemplate>
  28. </data:DataGridTemplateColumn>
  29. <data:DataGridTemplateColumn Header="Member">
  30. <data:DataGridTemplateColumn.CellTemplate>
  31. <DataTemplate>
  32. <TextBlock Text="{Binding Member.Name}" />
  33. </DataTemplate>
  34. </data:DataGridTemplateColumn.CellTemplate>
  35. <data:DataGridTemplateColumn.CellEditingTemplate>
  36. <DataTemplate>
  37. <ComboBox ItemsSource="{Binding MemberList,Source={StaticResource memberListProvider}}"
  38. SelectedItem="{Binding Member,Mode=TwoWay}"
  39. DisplayMemberPath="Name" />
  40. </DataTemplate>
  41. </data:DataGridTemplateColumn.CellEditingTemplate>
  42. </data:DataGridTemplateColumn>
  43. <data:DataGridTemplateColumn Header="Project" >
  44. <data:DataGridTemplateColumn.CellTemplate>
  45. <DataTemplate>
  46. <TextBlock Text="{Binding Project.Name}" />
  47. </DataTemplate>
  48. </data:DataGridTemplateColumn.CellTemplate>
  49. <data:DataGridTemplateColumn.CellEditingTemplate>
  50. <DataTemplate>
  51. <ComboBox ItemsSource="{Binding ProjectList,Source={StaticResource projectListProvider}}"
  52. SelectedItem="{Binding Project,Mode=TwoWay}"
  53. DisplayMemberPath="Name" />
  54. </DataTemplate>
  55. </data:DataGridTemplateColumn.CellEditingTemplate>
  56. </data:DataGridTemplateColumn>
  57. <data:DataGridTemplateColumn Header="Hours">
  58. <data:DataGridTemplateColumn.CellTemplate >
  59. <DataTemplate>
  60. <TextBox Text="{Binding Hours,Mode=TwoWay}"/>
  61. </DataTemplate>
  62. </data:DataGridTemplateColumn.CellTemplate>
  63. </data:DataGridTemplateColumn>
  64. <data:DataGridTemplateColumn Header="Description">
  65. <data:DataGridTemplateColumn.CellTemplate >
  66. <DataTemplate>
  67. <TextBox Text="{Binding Description,Mode=TwoWay}"/>
  68. </DataTemplate>
  69. </data:DataGridTemplateColumn.CellTemplate>
  70. </data:DataGridTemplateColumn>
  71. </data:DataGrid.Columns>
  72. </data:DataGrid>
  73. </Grid>
  74. </Border>
  75. <Border Style="{StaticResource ToolBoxStyle}">
  76. <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" >
  77. <Button x:Name="BtnSave" Content="Save" Margin="5,0,0,0" Style="{StaticResource BtnSaveStyle}" Click="BtnSave_Click" />
  78. <Button x:Name="BtnAdd" Content="Add" Margin="5,0,0,0" Style="{StaticResource BtnAddStyle}" Click="BtnAdd_Click"/>
  79. <Button x:Name="BtnDelete" Content="Delete" Margin="5,0,0,0" Style="{StaticResource BtnDeleteStyle}" Click="BtnDelete_Click"/>
  80. </StackPanel>
  81. </Border>
  82. </Grid>
  83. </navigation:Page>