Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/VB/MapDemo.Wpf/Themes/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/WPF/VB/MapDemo.Wpf/Themes/Generic.xaml

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
    xmlns:local="clr-namespace:MapDemo">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/MapDemo;component/Themes/Controls/PhotoGallery/MapNavigationWindow.xaml"/>
        <ResourceDictionary Source="/MapDemo;component/Themes/Controls/PhotoGallery/PhotoGalleryButton.xaml"/>
        <ResourceDictionary Source="/MapDemo;component/Themes/Controls/PhotoGallery/PhotoGalleryControl.xaml"/>
        <ResourceDictionary Source="/MapDemo;component/Themes/Controls/PhotoGallery/PhotoGalleryItemControl.xaml"/>
        <ResourceDictionary Source="/MapDemo;component/Themes/Controls/PhotoGallery/PlaceInfoControl.xaml"/>
        <ResourceDictionary Source="/MapDemo;component/Themes/Controls/PhotoGallery/CityInformationControl.xaml"/>
        <ResourceDictionary Source="/MapDemo;component/Themes/Controls/PhotoGallery/LabelControl.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    <local:DoubleToTimeSpanConvert x:Key="DoubleToTimeConverter"/>
    <Style TargetType="local:PlaneInfoPanel">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:PlaneInfoPanel">
                    <Grid x:Name="grid" Opacity="0">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="VisibleStates">
                                <VisualState x:Name="Visible">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Invisible">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.5">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="Back" Opacity="0.75">
                            <Border Background="Black" Opacity="0.25" CornerRadius="4" />
                            <Border Background="White" Margin="1" CornerRadius="3"/>
                        </Grid>
                        <StackPanel x:Name="Content" Margin="12,12,12,24">
                            <Image Source="{Binding Path=ActualPlaneInfo.ImagePath}" Stretch="None" HorizontalAlignment="Right" Margin="0,0,0,12"/>
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,6">
                                <TextBlock TextWrapping="Wrap" Text="Name:" Margin="0" Foreground="#FF6E6E6E" MinWidth="100"/>
                                <TextBlock TextWrapping="Wrap" Text="{Binding Path=ActualPlaneInfo.Name}" Foreground="#FF494949" FontWeight="Bold"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0">
                                <TextBlock TextWrapping="Wrap" Text="Flight number:" Margin="0" Foreground="#FF6E6E6E" MinWidth="100"/>
                                <TextBlock TextWrapping="Wrap" Text="{Binding Path=ActualPlaneInfo.PlaneID}" Foreground="#FF494949" FontWeight="Bold"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                <TextBlock TextWrapping="Wrap" Text="From:" Margin="0" Foreground="#FF6E6E6E" MinWidth="100"/>
                                <TextBlock TextWrapping="Wrap" Text="{Binding Path=ActualPlaneInfo.StartPointName}" Foreground="#FF494949" FontWeight="Bold"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,6">
                                <TextBlock TextWrapping="Wrap" Text="To:" Margin="0" Foreground="#FF6E6E6E" MinWidth="100"/>
                                <TextBlock TextWrapping="Wrap" Text="{Binding Path=ActualPlaneInfo.EndPointName}" Foreground="#FF494949" FontWeight="Bold"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                <TextBlock TextWrapping="Wrap" Text="Current time:" Margin="0" Foreground="#FF6E6E6E" MinWidth="100"/>
                                <TextBlock TextWrapping="Wrap" Text="{Binding Path=ActualPlaneInfo.CurrentFlightTime, Converter={StaticResource DoubleToTimeConverter}}" Foreground="#FF494949" FontWeight="Bold"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,6">
                                <TextBlock TextWrapping="Wrap" Text="Flight time:" Margin="0" Foreground="#FF6E6E6E" MinWidth="100"/>
                                <TextBlock TextWrapping="Wrap" Text="{Binding Path=ActualPlaneInfo.TotalFlightTime, Converter={StaticResource DoubleToTimeConverter}}" Foreground="#FF494949" FontWeight="Bold"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                <TextBlock TextWrapping="Wrap" Text="Speed:" Margin="0" Foreground="#FF6E6E6E" MinWidth="100"/>
                                <TextBlock TextWrapping="Wrap" Text="{Binding Path=ActualPlaneInfo.SpeedKmH}" Foreground="#FF494949" FontWeight="Bold"/>
                                <TextBlock TextWrapping="Wrap" Text=" km/h" Foreground="#FF494949" FontWeight="Bold"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                                <TextBlock TextWrapping="Wrap" Text="Altitude:" Margin="0" Foreground="#FF6E6E6E" MinWidth="100"/>
                                <TextBlock TextWrapping="Wrap" Text="{Binding Path=ActualPlaneInfo.FlightAltitude}" Foreground="#FF494949" FontWeight="Bold"/>
                                <TextBlock TextWrapping="Wrap" Text=" m" Foreground="#FF494949" FontWeight="Bold"/>
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="#FF6E6E6E"/>
    </Style>
    <Style TargetType="local:WeatherInfoPanel">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:WeatherInfoPanel">
                    <Grid x:Name="grid" Opacity="0">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="VisibleStates">
                                <VisualState x:Name="Visible">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.15" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Invisible">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00.5">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="Back">
                            <Border Background="White" Opacity="0.3" CornerRadius="4"/>
                            <Border Background="Black" Margin="1" Opacity="0.8" CornerRadius="3"/>
                        </Grid>
                        <StackPanel x:Name="Content" Margin="10,10,20,20">
                            <Grid HorizontalAlignment="Left">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition/>
                                    <ColumnDefinition/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition/>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>
                                <TextBlock Text="{Binding City}" FontSize="18" Foreground="White" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="10,5,0,5"/>
                                <Grid Grid.Row="1" Grid.Column="0">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{Binding WeatherIconPath}" Stretch="Fill" Margin="10,0,10,0" Width="50" Height="50"/>
                                        <TextBlock Text="{Binding TemperatureString}" Foreground="White" FontSize="30"/>
                                    </StackPanel>
                                </Grid>
                            </Grid>
                            <dxc:ChartControl x:Name="chart" Width="360" Height="180" EnableAnimation="True" BorderThickness="0" Margin="0" Padding="0" Background="{x:Null}">
                                <dxc:ChartControl.Diagram>
                                    <dxc:XYDiagram2D Margin="0" Padding="0" Background="Transparent">
                                        <dxc:XYDiagram2D.DefaultPane>
                                            <dxc:Pane Background="Transparent" DomainBrush="Transparent" DomainBorderBrush="Transparent"/>
                                        </dxc:XYDiagram2D.DefaultPane>
                                        <dxc:XYDiagram2D.AxisX>
                                            <dxc:AxisX2D TickmarksMinorVisible="False" TickmarksVisible="False"
                                                         DateTimeMeasureUnit="Hour" DateTimeGridAlignment="Day"
                                                         GridLinesMinorVisible="True" GridLinesVisible="True" GridSpacing="1"
                                                         GridLinesBrush="#60A0A0A0" GridLinesMinorBrush="#15808080"
                                                         Background="Transparent" >
                                                <dxc:AxisX2D.Label>
                                                    <dxc:AxisLabel FontSize="10" Foreground="White"/>
                                                </dxc:AxisX2D.Label>
                                                <dxc:AxisX2D.DateTimeOptions>
                                                    <dxc:DateTimeOptions Format="Custom" FormatString="dd.MM" />
                                                </dxc:AxisX2D.DateTimeOptions>
                                            </dxc:AxisX2D>
                                        </dxc:XYDiagram2D.AxisX>
                                        <dxc:XYDiagram2D.AxisY>
                                            <dxc:AxisY2D TickmarksMinorVisible="False" TickmarksVisible="False"
                                                         InterlacedBrush="Transparent"
                                                         GridLinesMinorVisible="True" GridLinesVisible="True" GridSpacing="3"
                                                         GridLinesBrush="#60A0A0A0" GridLinesMinorBrush="#15808080"
                                                         Background="Transparent" >
                                                <dxc:AxisY2D.Label>
                                                    <dxc:AxisLabel FontSize="10" Foreground="White"/>
                                                </dxc:AxisY2D.Label>
                                                <dxc:AxisY2D.Range>
                                                    <dxc:AxisRange dxc:AxisY2D.AlwaysShowZeroLevel="False" />
                                                </dxc:AxisY2D.Range>
                                            </dxc:AxisY2D>
                                        </dxc:XYDiagram2D.AxisY>
                                        <dxc:XYDiagram2D.Series>
                                            <dxc:LineSeries2D DataSource="{Binding Forecast}"
                                                              ArgumentDataMember="DateTime"
                                                              ValueDataMember="{Binding TemperatureValueDataMember}"
                                                              ArgumentScaleType="DateTime"
                                                              Background="Transparent"
                                                              CrosshairLabelPattern="{Binding CrosshairLabelPattern}"/>
                                        </dxc:XYDiagram2D.Series>
                                    </dxc:XYDiagram2D>
                                </dxc:ChartControl.Diagram>
                            </dxc:ChartControl>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="#FF6E6E6E"/>
    </Style>
    <Style TargetType="local:WeatherLabel">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:WeatherLabel">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard Storyboard.TargetName="border">
                                        <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#FF5080C0" Duration="0:0:0.25"/>
                                        <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.25"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.Effect>
                            <DropShadowEffect Color="Orange" Opacity="0" Direction="0" ShadowDepth="0" />
                        </Grid.Effect>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <Border x:Name="border" Background="Black" Opacity="0.6" CornerRadius="3" Grid.RowSpan="2" Grid.ColumnSpan="2"/>
                        <Image Source="{Binding WeatherIconPath}" Stretch="Fill" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Width="40" Height="40" Margin="3,0,3,0"/>
                        <TextBlock Text="{Binding City}" Grid.Row="0" Grid.Column="1" Foreground="White" Margin="0,2,10,0" FontSize="12"/>
                        <TextBlock Text="{Binding TemperatureString}" Grid.Row="1" Grid.Column="1" Foreground="White" Margin="0,0,10,0" FontSize="12"/>
                        <Grid.RenderTransform>
                            <TranslateTransform X="-20" Y="-20"/>
                        </Grid.RenderTransform>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="local:MapShapeTooltip">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:MapShapeTooltip">
                    <Canvas IsHitTestVisible="False" FlowDirection="LeftToRight">
                        <Border Canvas.Left="{Binding Path=Left, RelativeSource={RelativeSource Mode=TemplatedParent}}" Canvas.Top="{Binding Path=Top, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                                Background="White" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="5,0,5,0" CornerRadius="3" IsHitTestVisible="False">
                            <TextBlock Text="{TemplateBinding Text}" Height="Auto" Width="Auto" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ListBoxItem}" x:Key="radioListBoxItemStyle">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <RadioButton Margin="1.5,5,0,0" IsChecked="{Binding Path=IsSelected, RelativeSource={RelativeSource TemplatedParent}}" Content="{TemplateBinding Content}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>