Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKB/HeuristicLab.OKB.Cockpit.Admin/TableView.xaml @ 4954

Last change on this file since 4954 was 4311, checked in by swagner, 14 years ago

Integrated OKB clients for HL 3.3 (#1166)

File size: 2.3 KB
Line 
1<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3             xmlns:dg="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit"
4             xmlns:dgp="clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit"
5             x:Class="HeuristicLab.OKB.Cockpit.Admin.TableView">
6  <UserControl.InputBindings>
7    <KeyBinding Key="S" Modifiers="Control" Command="ApplicationCommands.Save" />
8  </UserControl.InputBindings>
9  <UserControl.CommandBindings>
10    <CommandBinding Command="ApplicationCommands.Save"
11                    Executed="CommandBinding_Executed"/>
12  </UserControl.CommandBindings>
13  <DockPanel>
14    <TextBlock Name="TableNameTextBlock" DockPanel.Dock="Top"/>
15    <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal">
16      <Button Padding="10 0 10 0" Margin="0 0 5 0" Click="OnSave">Save</Button>
17      <Button Padding="10 0 10 0" Click="OnLoad">Reload</Button>
18    </StackPanel>
19    <dg:DataGrid Name="Data" MinWidth="300" MinHeight="100"
20                 CanUserAddRows="True" CanUserDeleteRows="True"
21                 CanUserReorderColumns="True" CanUserResizeColumns="True" CanUserResizeRows="True" CanUserSortColumns="True"
22                 ClipboardCopyMode="IncludeHeader"
23                 HorizontalGridLinesBrush="LightGray" VerticalGridLinesBrush="LightGray"
24                 AlternationCount="2" AlternatingRowBackground="AliceBlue"
25                 AutoGeneratingColumn="OnAutoGeneratingColumn"
26                 SelectionUnit="CellOrRowHeader">
27      <dg:DataGrid.RowHeaderStyle>
28        <Style TargetType="{x:Type dgp:DataGridRowHeader}">
29          <Setter Property="Content" Value="{Binding Path=Id}"/>
30        </Style>
31      </dg:DataGrid.RowHeaderStyle>
32
33      <!-- demo data -->
34      <dg:DataGrid.Columns>
35        <dg:DataGridTextColumn Header="Id" IsReadOnly="True"/>
36        <dg:DataGridTextColumn Header="Name"  Binding="{Binding Path=Name}"/>
37        <dg:DataGridTextColumn Header="Description"  Binding="{Binding Path=Content}"/>
38      </dg:DataGrid.Columns>
39      <Button Name="Test">a simple test</Button>
40      <Button Name="Test2">another test</Button>
41      <Button Name="Test3">a simple test</Button>
42      <!-- /demo data -->
43
44    </dg:DataGrid>
45  </DockPanel>
46</UserControl>
Note: See TracBrowser for help on using the repository browser.