Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/Silverlight/CS/MapDemo/Modules/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/Silverlight/CS/MapDemo/Modules/PhotoGallery.SL.xaml

<local:MapDemoModule x:Class="MapDemo.PhotoGallery" mc:Ignorable="d" d:DesignHeight="557" d:DesignWidth="2643" xmlns:local="clr-namespace:MapDemo" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:dxdb="http://schemas.devexpress.com/winfx/2008/xaml/demobase" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map">
    <local:MapDemoModule.Resources>
        <DataTemplate x:Key="citySmallIconTemplate">
            <Image Source="/MapDemo;component/Images/PhotoGallery/CitySmallIcon.png" Stretch="None">
                <Image.RenderTransform>
                    <TranslateTransform X="-6" Y="-6" />
                </Image.RenderTransform>
            </Image>
        </DataTemplate>
    </local:MapDemoModule.Resources>
    <dxdb:DemoModuleControl>
        <dxdb:DemoModuleControl.Resources>
            <ResourceDictionary>
                <local:ViewTypeToBoolConverter x:Key="viewTypeToBoolConverter" />
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="/MapDemo;component/Themes/generic.SL.xaml" />
                </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>
        </dxdb:DemoModuleControl.Resources>
        <Grid>
            <Grid x:Name="LayoutRoot">
                <dxm:MapControl x:Name="map" Background="#FF2D2D2D" EnableZooming="False" ZoomLevel="{Binding ZoomLevel}" CenterPoint="{Binding CenterPoint, Mode=TwoWay}" FlowDirection="LeftToRight">
                    <dxm:MapControl.ZoomTrackbarOptions>
                        <dxm:ZoomTrackbarOptions Visible="False" />
                    </dxm:MapControl.ZoomTrackbarOptions>
                    <dxm:MapControl.ScrollButtonsOptions>
                        <dxm:ScrollButtonsOptions Visible="False" />
                    </dxm:MapControl.ScrollButtonsOptions>
                    <dxm:ImageTilesLayer x:Name="tileLayer">
                        <dxm:ImageTilesLayer.DataProvider>
                            <dxm:BingMapDataProvider BingKey="AvGf42cJHvRz4gJ00fmxgXXgxzgdCsPtMyg_HfX3JALXHZ24Ex5WdQw05B3uAViL" Kind="Area" />
                        </dxm:ImageTilesLayer.DataProvider>
                    </dxm:ImageTilesLayer>
                    <dxm:VectorLayer ItemsSource="{Binding Cities}" />
                    <dxm:VectorLayer>
                        <dxm:MapCustomElement x:Name="placePointer" Location="{Binding Content.SelectedPlace.Location, RelativeSource={RelativeSource Self}}">
                            <dxm:MapCustomElement.ContentTemplate>
                                <DataTemplate>
                                    <local:LabelControl>
                                        <local:LabelControl.Visible>
                                            <Binding Converter="{StaticResource viewTypeToBoolConverter}" Path="ViewType">
                                                <Binding.ConverterParameter>
                                                    <local:ViewType>Detail</local:ViewType>
                                                </Binding.ConverterParameter>
                                            </Binding>
                                        </local:LabelControl.Visible>
                                    </local:LabelControl>
                                </DataTemplate>
                            </dxm:MapCustomElement.ContentTemplate>
                        </dxm:MapCustomElement>
                    </dxm:VectorLayer>
                </dxm:MapControl>
                <local:MapNavigationWindow x:Name="navWindow" Margin="20" Width="300" Height="300" HorizontalAlignment="Left" VerticalAlignment="Top" CenterPoint="{Binding CenterPoint, Mode=TwoWay}" FlowDirection="LeftToRight">
                    <local:MapNavigationWindow.Visible>
                        <Binding Path="ViewType" Converter="{StaticResource viewTypeToBoolConverter}" Mode="TwoWay">
                            <Binding.ConverterParameter>
                                <local:ViewType>Map</local:ViewType>
                            </Binding.ConverterParameter>
                        </Binding>
                    </local:MapNavigationWindow.Visible>
                </local:MapNavigationWindow>

                <local:PhotoGalleryControl x:Name="photoGallery" AnchorPoint="{Binding CityPoint}" ItemsSource="{Binding Path=SelectedCity.Places}" Title="{Binding Path=SelectedCity.Name}" MouseLeftButtonUp="photoGallery_MouseLeftButtonUp">
                    <local:PhotoGalleryControl.Visible>
                        <Binding Path="ViewType" Converter="{StaticResource viewTypeToBoolConverter}" Mode="TwoWay">
                            <Binding.ConverterParameter>
                                <local:ViewType>Gallery</local:ViewType>
                            </Binding.ConverterParameter>
                        </Binding>
                    </local:PhotoGalleryControl.Visible>
                    <local:PhotoGalleryControl.ItemTemplate>
                        <DataTemplate>
                            <local:PhotoGalleryItemControl Margin="15" Click="GalleryItemClick" />
                        </DataTemplate>
                    </local:PhotoGalleryControl.ItemTemplate>
                </local:PhotoGalleryControl>
                <local:PlaceInfoControl x:Name="placeControl" Margin="10,10,10,80" HorizontalAlignment="Right" PlaceInfo="{Binding SelectedPlace}" ShowNextPlace="placeControl_ShowNextSight" ShowPrevPlace="placeControl_ShowPreviousSight">
                    <local:PlaceInfoControl.Visible>
                        <Binding Path="ViewType" Converter="{StaticResource viewTypeToBoolConverter}">
                            <Binding.ConverterParameter>
                                <local:ViewType>Detail</local:ViewType>
                            </Binding.ConverterParameter>
                        </Binding>
                    </local:PlaceInfoControl.Visible>
                </local:PlaceInfoControl>
                <StackPanel HorizontalAlignment="Left" Margin="15" Orientation="Horizontal" VerticalAlignment="Top">
                    <local:PhotoGalleryButton x:Name="backButton" Click="OnBackClick">
                        <local:PhotoGalleryButton.Visible>
                            <Binding Path="ViewType" Converter="{StaticResource viewTypeToBoolConverter}">
                                <Binding.ConverterParameter>
                                    <local:ViewType>Detail</local:ViewType>
                                </Binding.ConverterParameter>
                            </Binding>
                        </local:PhotoGalleryButton.Visible>
                        <Image Source="/MapDemo;component/Images/PhotoGallery/BackButton.png" Stretch="None" />
                    </local:PhotoGalleryButton>
                </StackPanel>
            </Grid>
        </Grid>
    </dxdb:DemoModuleControl>
</local:MapDemoModule>