private void ShowLayerConfiguration(bool animate)
        {
            if (layerConfigurationLayout != null && mapContentsLayout != null
                && layerConfigurationLayout.Opacity == 0)
            {
                RestoreLayerConfigurationVisualElements();

                if (_layerConfigPanel != null)
                {
                    ShowLayerConfigurationToolPanelCommand showLayerToolbar = new ShowLayerConfigurationToolPanelCommand();
                    showLayerToolbar.Duration = new Duration(new TimeSpan(0, 0, 0, 0));
                    showLayerToolbar.Show = false;
                    showLayerToolbar.LayerConfigurationToolPanel = _layerConfigPanel;
                    if (showLayerToolbar.CanExecute(null))
                        showLayerToolbar.Execute(null);
                }

                FlipFrameworkElementsCommand cmd = new FlipFrameworkElementsCommand()
                {
                    FrontElement = mapContentsLayout,
                    BackElement = layerConfigurationLayout,
                    Rotation = FlipFrameworkElementsCommand.RotationDirection.RightToLeft,
                    Duration = new Duration(new TimeSpan(0, 0, 0, 0, animate ? 1200 : 0)),
                };
                if (cmd.CanExecute(null))
                    cmd.Execute(null);
            }
        }
        public void GoToMapContent(bool animate)
        {
            if (layerConfigurationLayout != null && mapContentsLayout != null
                && mapContentsLayout.Opacity == 0)
            {
                FlipFrameworkElementsCommand cmd = new FlipFrameworkElementsCommand()
                {
                    FrontElement = layerConfigurationLayout,
                    BackElement = mapContentsLayout,
                    Rotation = FlipFrameworkElementsCommand.RotationDirection.LeftToRight,
                    Duration = new Duration(new TimeSpan(0, 0, 0, 0, animate ? 1200 : 0)),
                };
                cmd.RotationCompleted += (s, e) => RemoveLayerConfigurationVisualElements();
                if (cmd.CanExecute(null))
                    cmd.Execute(null);

                if (_layerConfigPanel != null)
                {
                    ShowLayerConfigurationToolPanelCommand showLayerToolbar = new ShowLayerConfigurationToolPanelCommand();
                    showLayerToolbar.Duration = new Duration(new TimeSpan(0, 0, 0, 0, animate ? 1300 : 100));
                    showLayerToolbar.Show = true;
                    showLayerToolbar.LayerConfigurationToolPanel = _layerConfigPanel;
                    if (showLayerToolbar.CanExecute(null))
                        showLayerToolbar.Execute(null);
                }
            }
        }