Admin.xaml
上传用户:jxqhsy
上传日期:2020-12-31
资源大小:1793k
文件大小:8k
源码类别:

SilverLight

开发平台:

HTML/CSS

  1. <UserControl xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"  x:Class="SFGS.Admin"
  2.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  3.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
  4.     xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
  5.     Width="960" Height="700" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
  6.     
  7.         <StackPanel Margin="10,10,10,10" Background="White">
  8.             <TextBlock Text="Existing Surverys" Margin="0,20,10,20"
  9.             FontFamily="Verdana" FontSize="18" FontWeight="Bold"
  10.             Foreground="#FF5C9AC9" />
  11.         <data:DataGrid x:Name="dataGrid4" Height="160" Margin="0,5,0,10" RowHeight="40" AutoGenerateColumns="False" >
  12.             <data:DataGrid.Columns>
  13.                 
  14.                 <data:DataGridTemplateColumn Header="Name" Width="100">
  15.                     <data:DataGridTemplateColumn.CellTemplate>
  16.                         <DataTemplate>
  17.                             <StackPanel Orientation="Horizontal">
  18.                                 <TextBlock Text="{Binding Name}" />
  19.                             </StackPanel>
  20.                         </DataTemplate>
  21.                     </data:DataGridTemplateColumn.CellTemplate>
  22.                 </data:DataGridTemplateColumn>
  23.                 
  24.                 <data:DataGridTemplateColumn Header="Description" Width="200">
  25.                     <data:DataGridTemplateColumn.CellTemplate>
  26.                         <DataTemplate>
  27.                             <StackPanel Orientation="Horizontal">
  28.                                 <TextBlock Text="{Binding Description}" />
  29.                             </StackPanel>
  30.                         </DataTemplate>
  31.                     </data:DataGridTemplateColumn.CellTemplate>
  32.                 </data:DataGridTemplateColumn>
  33.                 
  34.                 <data:DataGridTemplateColumn Header="Responses" Width="100">
  35.                     <data:DataGridTemplateColumn.CellTemplate>
  36.                         <DataTemplate>
  37.                             <StackPanel Orientation="Horizontal">
  38.                                 <TextBlock Text="{Binding Responses}" />
  39.                             </StackPanel>
  40.                         </DataTemplate>
  41.                     </data:DataGridTemplateColumn.CellTemplate>
  42.                 </data:DataGridTemplateColumn>                 
  43.                 
  44.                 <data:DataGridTemplateColumn>
  45.                     <data:DataGridTemplateColumn.CellTemplate>
  46.                         <DataTemplate>
  47.                             <StackPanel Orientation="Horizontal">
  48.                                 <HyperlinkButton x:Name="Result"  Tag="{Binding ID}"  Width="80" Height="30"  FontSize="10" Foreground="Blue" Content="{Binding Result}" Click="Result_Click" />
  49.                             </StackPanel>
  50.                         </DataTemplate>
  51.                     </data:DataGridTemplateColumn.CellTemplate>                   
  52.                 </data:DataGridTemplateColumn>
  53.                 
  54.                 <data:DataGridTemplateColumn>
  55.                     <data:DataGridTemplateColumn.CellTemplate>
  56.                         <DataTemplate>
  57.                             <StackPanel Orientation="Horizontal">
  58.                                 <HyperlinkButton x:Name="Question" Tag="{Binding ID}" Width="80" Height="30" FontSize="10" Foreground="Blue"  Content="{Binding Question}" Click="Question_Click" />
  59.                                 <HyperlinkButton x:Name="Edit" Tag="{Binding ID}" Width="80" Height="30" FontSize="10" Foreground="Blue"  Content="{Binding Edit}" Click="Edit_Click" />
  60.                             </StackPanel>
  61.                         </DataTemplate>
  62.                     </data:DataGridTemplateColumn.CellTemplate>
  63.                 </data:DataGridTemplateColumn>       
  64.                 
  65.                 <data:DataGridTemplateColumn>
  66.                     <data:DataGridTemplateColumn.CellTemplate>
  67.                         <DataTemplate>
  68.                             <StackPanel Orientation="Horizontal">
  69.                                 <HyperlinkButton x:Name="Delete" Tag="{Binding ID}" Width="80" Height="30" FontSize="10" Foreground="Blue"  Content="{Binding Delete}" Click="Delete_Click" />
  70.                             </StackPanel>
  71.                         </DataTemplate>
  72.                     </data:DataGridTemplateColumn.CellTemplate>
  73.                 </data:DataGridTemplateColumn>
  74.                 
  75.                 <data:DataGridTemplateColumn>
  76.                     <data:DataGridTemplateColumn.CellTemplate>
  77.                         <DataTemplate>
  78.                             <StackPanel Orientation="Horizontal">
  79.                                 <HyperlinkButton x:Name="theNew" Tag="{Binding ID}" Width="80" Height="30" FontSize="10" Foreground="Blue"  Content="{Binding theNew}" Click="theNew_Click" />
  80.                             </StackPanel>
  81.                         </DataTemplate>
  82.                     </data:DataGridTemplateColumn.CellTemplate>
  83.                 </data:DataGridTemplateColumn>
  84.                 
  85.             </data:DataGrid.Columns>
  86.         </data:DataGrid>
  87.         <Grid x:Name="LayoutRoot" Width="1000" Height="800" ShowGridLines="False">
  88.             <Grid.RowDefinitions>
  89.                 <RowDefinition Height="260" />
  90.                 <RowDefinition Height="*" />
  91.             </Grid.RowDefinitions>
  92.             <Grid.ColumnDefinitions>
  93.                 <ColumnDefinition Width="450" />
  94.                 <ColumnDefinition Width="*" />
  95.             </Grid.ColumnDefinitions>
  96.             
  97.             <Border BorderThickness="20,50,40,130" CornerRadius="20,20,20,20"  Grid.Row="0" Grid.Column="0">
  98.                 <Border BorderBrush="Black" CornerRadius="20,20,20,20" BorderThickness="1,1,1,1">
  99.                     <Grid>
  100.                         <Grid.RowDefinitions>
  101.                             <RowDefinition Height="35" />
  102.                             <RowDefinition Height="*" />
  103.                         </Grid.RowDefinitions>
  104.                         <TextBlock Text="Click here to Add a New Survey" Margin="20,0,0,0"  FontSize="20" Grid.Row="0"/>                        
  105.                         <HyperlinkButton x:Name="addNewSurvey"  Foreground="Blue" Content="New..." Margin="-270,0,0,0"  FontSize="20" Grid.Row="1" Width="80" Height="30" Click="addNewSurvey_Click" />
  106.                     </Grid>                      
  107.                 </Border>                  
  108.             </Border>
  109.             
  110.             <Border BorderThickness="20,50,120,20" CornerRadius="20,20,20,20"  Grid.Row="0" Grid.Column="1">
  111.                 <Border BorderBrush="Black" CornerRadius="20,20,20,20" BorderThickness="1,1,1,1" Height="183">
  112.                     <Grid>
  113.                         <Grid.RowDefinitions>
  114.                             <RowDefinition Height="35" />
  115.                             <RowDefinition Height="*" />
  116.                         </Grid.RowDefinitions>
  117.                         <TextBlock Text="Currently Displayed Survey:" Margin="20,0,0,0"  FontSize="20" Grid.Row="0"/>
  118.                         <ComboBox x:Name="theDisplayedSurvey" Grid.Row="1" Height="30" Margin="20,4.5,89,0" VerticalAlignment="Top" d:LayoutOverrides="Height"/>
  119.                         <Button x:Name="btnSaveDisSurvey"  HorizontalAlignment="Left" Margin="23,59,0,54" Width="120" Content="Save" Grid.Row="1" Click="btnSaveDisSurvey_Click" />
  120.                         <TextBlock x:Name="theMessage"  Margin="159,68,17,54" TextWrapping="Wrap" Grid.Row="1" FontSize="16" Foreground="#FFFA0707" />
  121.                     </Grid>
  122.                 </Border>
  123.             </Border>
  124.             
  125.             <HyperlinkButton x:Name="logout"  Content="Logout" Grid.Row="1" Grid.Column="1" Height="32" Margin="0,29,98,0" Background="{x:Null}" VerticalAlignment="Top" Foreground="#FF0000FF" FontSize="20" Width="88" HorizontalAlignment="Right" Click="logout_Click" />
  126.         </Grid>
  127.     </StackPanel>      
  128. </UserControl>