PageRenderTime 168ms CodeModel.GetById 161ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/Bifrost.Mimir/Features/General/Pivot/View.xaml

#
XAML | 63 lines | 52 code | 11 blank | 0 comment | 0 complexity | 714fd1bd23a9221cb69a86ad40576b09 MD5 | raw file
 1<UserControl x:Class="Bifrost.Mimir.Features.General.Pivot.View"
 2			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 3			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 4			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
 5			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Bifrost.Mimir.Features.General.Pivot" mc:Ignorable="d"
 6			 d:DesignHeight="300" 
 7			 d:DesignWidth="400"
 8             xmlns:pivot="clr-namespace:System.Windows.Controls.Pivot;assembly=System.Windows.Controls.Pivot"
 9             DataContext="{Binding Source={StaticResource ViewModelLocator}, Path=Pivot}"
10             >
11    <Grid x:Name="LayoutRoot">
12        <Grid.RowDefinitions>
13            <RowDefinition Height="30"/>
14            <RowDefinition Height="*"/>
15        </Grid.RowDefinitions>
16
17
18        <StackPanel Orientation="Horizontal" Grid.Row="0">
19            <Button Content="Republish" Command="{Binding RepublishFilteredCommand}"/>
20            <Button Content="Reload" Command="{Binding ReloadCommand}" Click="Button_Click"/>
21        </StackPanel>
22
23
24
25        <pivot:PivotViewer x:Name="_pivotViewer" Grid.Row="1" ItemsSource="{Binding Events}">
26            <pivot:PivotViewer.ItemTemplates>
27                <pivot:PivotViewerItemTemplate>
28                    <StackPanel Orientation="Vertical">
29
30                        <Grid>
31                            <Grid.ColumnDefinitions>
32                                <ColumnDefinition Width="64"/>
33                                <ColumnDefinition Width="*"/>
34                            </Grid.ColumnDefinitions>
35
36                            <Image Source="/Bifrost.Mimir;component/Features/General/Pivot/Event.png" Grid.Column="0"/>
37                            <TextBlock FontSize="64" Text="{Binding LogicalEventName}" Grid.Column="1"/>
38                        </Grid>
39
40                        <Grid>
41                            <Grid.ColumnDefinitions>
42                                <ColumnDefinition Width="32"/>
43                                <ColumnDefinition Width="*"/>
44                            </Grid.ColumnDefinitions>
45
46                            <Image Source="/Bifrost.Mimir;component/Features/General/Pivot/Occured.png" Grid.Column="0"/>
47                            <TextBlock FontSize="32" Text="{Binding Occured}" Grid.Column="1"/>
48                        </Grid>
49                    </StackPanel>
50                </pivot:PivotViewerItemTemplate>
51            </pivot:PivotViewer.ItemTemplates>
52
53            <pivot:PivotViewer.PivotProperties>
54                <pivot:PivotViewerStringProperty Id="Command" Options="CanFilter" Binding="{Binding CommandName}"/>
55                <pivot:PivotViewerStringProperty Id="Event" Options="CanFilter" Binding="{Binding LogicalEventName}"/>
56                <pivot:PivotViewerStringProperty Id="AggregatedRoot" Options="CanFilter" Binding="{Binding AggregatedRoot}"/>
57                <pivot:PivotViewerStringProperty Id="Aggregated Id" Options="CanFilter" Binding="{Binding AggregatedId}"/>
58                <pivot:PivotViewerDateTimeProperty Id="Occured" Options="CanFilter" Binding="{Binding Occured}"/>
59            </pivot:PivotViewer.PivotProperties>
60            
61        </pivot:PivotViewer>
62    </Grid>
63</UserControl>