Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKB/HeuristicLab.OKB.Cockpit.Admin/ItemSelector.xaml @ 5345

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

Integrated OKB clients for HL 3.3 (#1166)

File size: 2.0 KB
Line 
1<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3             x:Class="HeuristicLab.OKB.Cockpit.Admin.ItemSelector">
4  <UserControl.Resources>
5    <Style TargetType="{x:Type ListBoxItem}">
6      <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
7    </Style>
8    <ItemsPanelTemplate x:Key="ButtonPanel">
9      <StackPanel CanHorizontallyScroll="True" CanVerticallyScroll="False"/>
10    </ItemsPanelTemplate>
11    <DataTemplate x:Key="AvailableButton">
12      <ToggleButton Margin="0 0 2 0"
13                    Content="{Binding Path=Obj.Name}"
14                    ToolTip="{Binding Path=Obj.Description}"
15                    IsChecked="{Binding Path=IsChecked}"
16                    Tag="{Binding}"
17                    Click="OnAvailableClicked"/>
18    </DataTemplate>
19    <DataTemplate x:Key="SelectedButton">
20      <Button Content="{Binding Name}"
21              ToolTip="{Binding Description}"
22              Tag="{Binding}"
23              Click="OnSelectedClicked"/>
24    </DataTemplate>
25  </UserControl.Resources>
26
27  <Grid>
28
29    <Grid.RowDefinitions>
30      <RowDefinition/>
31    </Grid.RowDefinitions>
32    <Grid.ColumnDefinitions>
33      <ColumnDefinition/>
34      <ColumnDefinition/>
35    </Grid.ColumnDefinitions>
36
37    <GroupBox Name="AvailableObjectsGroupBox" Header="Available" Margin="0 0 4 0">
38      <ListBox Name="AvailableObjectsList"
39               ItemsPanel="{StaticResource ButtonPanel}"
40               ItemTemplate="{StaticResource AvailableButton}"
41               SelectedValuePath="Id"/>
42    </GroupBox>
43    <GridSplitter Width="3"/>
44
45    <GroupBox Name="SelectedObjectsGroupBox" Header="Selected" Grid.Column="2">
46      <ListBox Name="SelectedObjectsList"
47               ItemsPanel="{StaticResource ButtonPanel}"
48               ItemTemplate="{StaticResource SelectedButton}"
49               SelectedValuePath="Id"/>
50    </GroupBox>
51  </Grid>
52</UserControl>
Note: See TracBrowser for help on using the repository browser.