Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/VB/PivotGridDemo.Wpf/Modules/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/VB/PivotGridDemo.Wpf/Modules/Dashboard.xaml

<local:PivotGridDemoModule x:Class="PivotGridDemo.PivotGrid.Dashboard"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:collections="clr-namespace:System.Collections;assembly=mscorlib"
    xmlns:local="clr-namespace:PivotGridDemo.PivotGrid"
    xmlns:dxpg="http://schemas.devexpress.com/winfx/2008/xaml/pivotgrid"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    xmlns:dxdb="http://schemas.devexpress.com/winfx/2008/xaml/demobase"
    xmlns:dxga="http://schemas.devexpress.com/winfx/2008/xaml/gauges"
    Height="300" Width="300">
    <local:PivotGridDemoModule.Resources>
        <Style TargetType="{x:Type local:SimpleGaugeControl}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type local:SimpleGaugeControl}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <dxga:CircularGaugeControl HorizontalAlignment="Center" Width="216" Height="155" >
                                <dxga:CircularGaugeControl.Model>
                                    <dxga:CircularClassicModel/>
                                </dxga:CircularGaugeControl.Model>
                                <dxga:CircularGaugeControl.Scales>
                                    <dxga:ArcScale StartValue="{TemplateBinding Min}" EndValue="{TemplateBinding Max}" MajorIntervalCount="2" ShowMinorTickmarks="true" StartAngle="-200" EndAngle="20">
                                        <dxga:ArcScale.LabelOptions>
                                            <dxga:ArcScaleLabelOptions FormatString="{}{0}" Orientation="LeftToRight" />
                                        </dxga:ArcScale.LabelOptions>
                                        <dxga:ArcScale.Needles>
                                            <dxga:ArcScaleNeedle Value="{Binding Value, RelativeSource={RelativeSource TemplatedParent}}"/>
                                        </dxga:ArcScale.Needles>
                                        <dxga:ArcScale.Layers>
                                            <dxga:ArcScaleLayer/>
                                        </dxga:ArcScale.Layers>
                                    </dxga:ArcScale>
                                </dxga:CircularGaugeControl.Scales>
                            </dxga:CircularGaugeControl>
                            <Viewbox Grid.Row="1" Width="80" Height="15">
                                <ContentControl FontWeight="UltraBold" Name="PART_Text"/>
                            </Viewbox>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </local:PivotGridDemoModule.Resources>
    <dxdb:DemoModuleControl>
        <dxdb:DemoModuleControl.OptionsContent>
            <StackPanel Orientation="Vertical">
                <dx:GroupFrame Header="Report">
                    <dxe:ListBoxEdit x:Name="dashboardList" ShowBorder="False" SelectedIndex="0" Background="{x:Null}" SelectedIndexChanged="ListBoxEdit_SelectionChanged">
                        <dxe:ListBoxEdit.StyleSettings>
                            <dxe:RadioListBoxEditStyleSettings />
                        </dxe:ListBoxEdit.StyleSettings>
                        <dxe:ListBoxEdit.Items>
                            <sys:String>Complete Report</sys:String>
                            <sys:String>Year-by-Year Comparison</sys:String>
                            <sys:String>Groups Comparison</sys:String>
                        </dxe:ListBoxEdit.Items>
                    </dxe:ListBoxEdit>
                </dx:GroupFrame>
            </StackPanel>
        </dxdb:DemoModuleControl.OptionsContent>

        <Grid Margin="12">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <dxpg:PivotGridControl local:FieldAreaHelper.FixAreas="True" x:Name="pivotGrid" Grid.Row="0" Grid.ColumnSpan="3" GridLayout="pivotGrid_GridLayout"
                                   ShowColumnHeaders="False" ShowDataHeaders="False" ShowFilterHeaders="False" ShowRowHeaders="False" RowTreeWidth="202">
                <dxpg:PivotGridControl.Fields>
                    <dxpg:PivotGridField x:Name="fieldCategory" FieldName="CategoryName" Area="RowArea" Width="100" Caption="Category" />
                    <dxpg:PivotGridField x:Name="fieldProduct" FieldName="ProductName" Area="RowArea" Width="200" Caption="Product" />
                    <dxpg:PivotGridField x:Name="fieldSales" FieldName="ProductSales" Area="DataArea" Caption="Sales" AllowedAreas="DataArea" />
                    <dxpg:PivotGridField x:Name="fieldYear" FieldName="ShippedDate" Area="ColumnArea" GroupInterval="DateYear" Caption="Year" />
                    <dxpg:PivotGridField x:Name="fieldQuarter" FieldName="ShippedDate" Area="ColumnArea" GroupInterval="DateQuarter" Caption="Quarter" />
                </dxpg:PivotGridControl.Fields>
            </dxpg:PivotGridControl>
            <StackPanel Orientation="Vertical" Grid.Column="0" Grid.Row="1" Margin="15,7,0,5" HorizontalAlignment="Center">
                <TextBlock TextWrapping="Wrap" Height="49" Margin="0,0,0,4" FontSize="18" TextAlignment="Center"
                           FontWeight="DemiBold"
                           HorizontalAlignment="Center">Average<LineBreak />Transaction Value</TextBlock>
                <local:SimpleGaugeControl x:Name="avgTransGauge" ValueStringFormat="c" HorizontalAlignment="Center"/>
            </StackPanel>

            <StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="1" Margin="0,7,0,5" HorizontalAlignment="Center">
                <TextBlock TextWrapping="Wrap" Height="49" Margin="0,0,0,4" TextAlignment="Center"
                           FontSize="18" FontWeight="DemiBold"
                           HorizontalAlignment="Center">Sales Compared<LineBreak />to Last Year</TextBlock>
                <dx:SimplePanel>
                    <local:SimpleGaugeControl x:Name="salesToLastYearGauge" ValueStringFormat="f2" HorizontalAlignment="Center" />
                    <TextBlock Margin="0,45,0,0" x:Name="salesToLastYearNA" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center">Not available.</TextBlock>
                </dx:SimplePanel>
            </StackPanel>

            <StackPanel Orientation="Vertical" Grid.Column="2" Grid.Row="1" Margin="0,7,15,5" HorizontalAlignment="Center">
                <TextBlock FontSize="18" TextWrapping="Wrap" Height="49" Margin="0,0,0,4" TextAlignment="Center"
                           FontWeight="DemiBold"
                           HorizontalAlignment="Center">Sales<LineBreak />to Target</TextBlock>
                <local:SimpleGaugeControl x:Name="salesToTargetGauge" ValueStringFormat="f2" HorizontalAlignment="Center" />
            </StackPanel>
        </Grid>
    </dxdb:DemoModuleControl>
</local:PivotGridDemoModule>