PageRenderTime 75ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 1ms

/V4/Quickstarts/UIComposition/EmployeeModule/Views/EmployeeSummaryView.xaml

#
XAML | 46 lines | 38 code | 5 blank | 3 comment | 0 complexity | f611edf47de5b78e4ace6987f864245d MD5 | raw file
  1. <UserControl x:Class="UIComposition.EmployeeModule.Views.EmployeeSummaryView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
  5. xmlns:prism="http://www.codeplex.com/prism">
  6. <Grid x:Name="LayoutRoot">
  7. <Grid.Background>
  8. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  9. <GradientStop Color="#FF7B97D4" />
  10. <GradientStop Color="#FF244C8D" Offset="1" />
  11. </LinearGradientBrush>
  12. </Grid.Background>
  13. <Grid.ColumnDefinitions>
  14. <ColumnDefinition Width="*" />
  15. </Grid.ColumnDefinitions>
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="Auto" />
  18. <RowDefinition Height="*" />
  19. </Grid.RowDefinitions>
  20. <TextBlock Grid.Row="0" Text="Employee Summary View" TextWrapping="Wrap" FontSize="18" Foreground="#FF2F3806" Margin="8" />
  21. <!--The Tab control defines a region, TabRegion, into which the EmployeeDetailsView and EmployeeProjectsView will be displayed.-->
  22. <!--The TabRegion defines a RegionContext which provides a reference to the currently selected employee.-->
  23. <sdk:TabControl Grid.Row="1" AutomationProperties.AutomationId="EmployeeSummaryTabControl" Margin="8"
  24. prism:RegionManager.RegionName="TabRegion"
  25. prism:RegionManager.RegionContext="{Binding CurrentEmployee}"
  26. Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
  27. <prism:TabControlRegionAdapter.ItemContainerStyle>
  28. <Style TargetType="sdk:TabItem">
  29. <Setter Property="HeaderTemplate">
  30. <Setter.Value>
  31. <!--Display the child view name on the tab header-->
  32. <DataTemplate>
  33. <TextBlock Text="{Binding ViewName}" />
  34. </DataTemplate>
  35. </Setter.Value>
  36. </Setter>
  37. </Style>
  38. </prism:TabControlRegionAdapter.ItemContainerStyle>
  39. </sdk:TabControl>
  40. </Grid>
  41. </UserControl>