Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKB/HeuristicLab.MainForm.WPF/OperationBarPanel.xaml @ 5328

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

Integrated OKB clients for HL 3.3 (#1166)

File size: 1.6 KB
Line 
1<StatusBar xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
2           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3           xmlns:src="clr-namespace:HeuristicLab.MainForm.WPF"
4           x:Class="HeuristicLab.MainForm.WPF.OperationBarPanel">
5  <StatusBar.Resources>
6    <src:AndNotConverter x:Key="AndNotConverter"/>
7  </StatusBar.Resources>
8  <StatusBar.ItemsPanel>
9    <ItemsPanelTemplate>
10      <UniformGrid Rows="1" Margin="0 -5 0 -5"/>
11    </ItemsPanelTemplate>
12  </StatusBar.ItemsPanel>
13  <StatusBar.ItemTemplate>
14    <DataTemplate DataType="src:ObservableBackgroundWorker">
15      <Button Tag="{Binding}"
16            Padding="1 -2 1 -2"
17            IsEnabled="{Binding Path=IsRunning}">
18        <Grid>
19          <ProgressBar Value="{Binding Path=Progress, Mode=OneWay}"
20                     Margin="-3 0 -3 0"
21                     MinWidth="10">
22            <ProgressBar.IsIndeterminate>
23              <MultiBinding Converter="{StaticResource AndNotConverter}">
24                <Binding Path="IsRunning"/>
25                <Binding Path="WorkerReportsProgress"/>
26              </MultiBinding>
27            </ProgressBar.IsIndeterminate>
28          </ProgressBar>
29          <TextBlock Name="Name" Margin="3 1 3 1" Text="{Binding Name}"/>
30        </Grid>
31      </Button>
32      <DataTemplate.Triggers>
33        <DataTrigger Binding="{Binding CancellationPending}" Value="true">
34          <Setter TargetName="Name" Property="Run.TextDecorations" Value="Strikethrough"/>
35        </DataTrigger>
36      </DataTemplate.Triggers>
37    </DataTemplate>
38  </StatusBar.ItemTemplate>
39</StatusBar>
Note: See TracBrowser for help on using the repository browser.