Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8739949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:02:42+00:00 2026-06-13T11:02:42+00:00

I intended to create a Windows 8 Style App (Metro), but found out there

  • 0

I intended to create a Windows 8 Style App (Metro), but found out there is no support for using dual screen which is a demand for my app.

Now I am redesigning my app as a desktop application in WPF.
But I still like to mimic some nice design features from Windows 8 Apps.

One of the design features is the fly out bars typically used in a Windows 8 style app:

  • Bottom App bar for commands
  • Top Navigational bar
  • Right Charm that is common for all apps

The design they all have in common is a temporary flyout panel that is layered on top of the current window layout.

My question is: How can I create something similar in WPF?

I have no problem to create a main grid with a hidden bottom row that is made visible to display some common command buttons. But it would be nice to have it fly out on top of my standard layout, not squeeze it.

I know it is possible to open a new window on top of the current but that creates a bad code design and is hard to get nice looking. I would prefer to do it in the same window.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:02:43+00:00Added an answer on June 13, 2026 at 11:02 am

    Cool question! I’ve actually done the charm bar fairly recently..

    ideally what you need is something like

    <Grid x:Name="LayoutRoot">
    
     <Grid x:Name="Overlay" Panel.ZIndex="1000" Visibility="Collapsed">
        <!-- This is where your slide out control is going to go -->
      </Grid>
    
      <!-- Use whatever layout you need -->
      <ContentControl x:Name="MainContent" />
    
    </Grid>
    

    Now rather than squeezing the content – the Overlay grid will be on top of it similar to the charm bar! all with XAML

    If you have anymore questions about this, give me a shout!

    Edit; my Charm implementation – feel free to use for inspriation!

    public class SlidePanel : ContentControl
        {
            static SlidePanel()
            {
                DefaultStyleKeyProperty.OverrideMetadata(typeof(SlidePanel), new FrameworkPropertyMetadata(typeof(SlidePanel)));
            }
    
            public SlidePanel()
            {
                EventManager.RegisterClassHandler(typeof(SlidePanel), SlidePanel.MouseEnterEvent,
                                                  new RoutedEventHandler(OnLocalMouseEnter));
    
                EventManager.RegisterClassHandler(typeof(SlidePanel), SlidePanel.MouseLeaveEvent,
                                                  new RoutedEventHandler(OnLocalMouseLeave));
            }
    
            #region Mouse Handlers
    
            private static void OnLocalMouseEnter(object sender, RoutedEventArgs e)
            {
                SetExpanded(sender, true);
            }
    
            private static void OnLocalMouseLeave(object sender, RoutedEventArgs e)
            {
                SetExpanded(sender, false);
    
            }
    
            private static void SetExpanded(object sender, bool expanded)
            {
                SlidePanel panel = sender as SlidePanel;
    
                if (panel != null)
                {
                    panel.IsExpanded = expanded;
                }
            }
    
            #endregion Mouse Handlers
    
            #region Panel Width
    
            public double PanelWidth
            {
                get { return (double)GetValue(PanelWidthProperty); }
                set { SetValue(PanelWidthProperty, value); }
            }
    
            // Using a DependencyProperty as the backing store for PanelWidth.  This enables animation, styling, binding, etc...
            public static readonly DependencyProperty PanelWidthProperty =
                DependencyProperty.Register("PanelWidth", typeof(double), typeof(SlidePanel), new UIPropertyMetadata(5.0));
    
            #endregion Panel Width
    
            #region Closed Width
    
            public double ClosedWidth
            {
                get { return (double)GetValue(ClosedWidthProperty); }
                set { SetValue(ClosedWidthProperty, value); }
            }
    
            // Using a DependencyProperty as the backing store for ClosedWidth.  This enables animation, styling, binding, etc...
            public static readonly DependencyProperty ClosedWidthProperty =
                DependencyProperty.Register("ClosedWidth", typeof(double), typeof(SlidePanel), new UIPropertyMetadata(5.0, new PropertyChangedCallback(OnClosedWidthChange)));
    
            #endregion Closed Width
    
            #region Expanded Property
    
            public bool IsExpanded
            {
                get { return (bool)GetValue(IsExpandedProperty); }
                set { SetValue(IsExpandedProperty, value); }
            }
    
            // Using a DependencyProperty as the backing store for IsExpanded.  This enables animation, styling, binding, etc...
            public static readonly DependencyProperty IsExpandedProperty =
                DependencyProperty.Register("IsExpanded", typeof(bool), typeof(SlidePanel), new UIPropertyMetadata(false, new PropertyChangedCallback(OnExpandedChanged)));
    
    
            #endregion Expanded Property
    
            #region Property Changes
    
            private static void OnExpandedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
            {
                if (e.NewValue == e.OldValue)
                    return;
    
                SlidePanel panel = d as SlidePanel;
    
                if (panel == null)
                    return;
    
                bool newVal = (bool)e.NewValue;
    
                panel.IsExpanded = newVal;
    
                bool expanded = (bool)panel.GetValue(IsExpandedProperty);
    
                Storyboard widthAnimation = AnimationHelper.CreateDoubleAnimation<SlidePanel>(panel, expanded,
                    (p, a) =>
                    {
                        a.From = (double)p.GetValue(SlidePanel.ClosedWidthProperty);
                        a.To = (double)p.GetValue(SlidePanel.PanelWidthProperty);
                    },
                    (p, a) =>
                    {
                        a.From = (double)p.GetValue(SlidePanel.WidthProperty);
                        a.To = (double)p.GetValue(SlidePanel.ClosedWidthProperty);
                    }, new TimeSpan(0, 0, 0, 0, 300), WidthProperty);
    
                Timeline opacity = AnimationHelper.DoubleAnimation(0.0, 1.0, expanded,
                                                                          new TimeSpan(0, 0, 0, 0, 300), OpacityProperty);
    
                Storyboard.SetTargetName(opacity, panel.Name);
    
                Storyboard.SetTargetProperty(opacity, new PropertyPath(OpacityProperty));
    
                widthAnimation.Children.Add(opacity);
    
                widthAnimation.Begin(panel);
    
            }
    
            private static void OnClosedWidthChange(DependencyObject d, DependencyPropertyChangedEventArgs e)
            {
                SlidePanel panel = d as SlidePanel;
    
                if (panel != null)
                    panel.Width = (double)e.NewValue;
            }
    
            #endregion Property Changes
        }
    

    A little trick I found was to have the opacity set to 0 when it wasnt expanded but set the width to 10, this then allows the user to put the mouse at the side of the screen and then it will appear after a second or so..
    cheers.

    Edit – As requested.. AnimationHelper.

      public class AnimationHelper
        {
            public static Timeline DoubleAnimation(double from, double to, bool modifier, TimeSpan duration, DependencyProperty property)
            {
                DoubleAnimation animation = new DoubleAnimation();
    
                if (modifier)
                {
                    animation.From = from;
                    animation.To = to;
    
                }
                else
                {
                    animation.To = from;
                    animation.From = to;
                }
    
                animation.Duration = new Duration(duration);
    
                return animation;
            }
    
            public static Storyboard CreateDoubleAnimation<T>(T control, bool modifier, double from, double to, TimeSpan duration, DependencyProperty property) where T : Control
            {
                return
                 AnimationHelper.CreateDoubleAnimation<T>(control, modifier,
                    (p, a) =>
                    {
                        a.From = from;
                        a.To = to;
                    },
                    (p, a) =>
                    {
                        a.From = to;
                        a.To = from;
                    }, duration, property);
            }
    
            public static Storyboard CreateDoubleAnimation<T>(T control, bool modifier, Action<T, DoubleAnimation> onTrue, Action<T, DoubleAnimation> onFalse, TimeSpan duration, DependencyProperty property) where T : Control
            {
                if (control == null)
                    throw new ArgumentNullException("control");
    
                DoubleAnimation panelAnimation = new DoubleAnimation();
    
                if (modifier)
                {
                    if (onTrue != null)
                        onTrue.Invoke(control, panelAnimation);
    
                }
                else
                {
                    if (onFalse != null)
                        onFalse.Invoke(control, panelAnimation);
                }
    
    
                panelAnimation.Duration = new Duration(duration);
    
                Storyboard sb = new Storyboard();
    
                Storyboard.SetTargetName(panelAnimation, control.Name);
    
                Storyboard.SetTargetProperty(panelAnimation, new PropertyPath(property));
    
                sb.Children.Add(panelAnimation);
    
                return sb;
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I intended to create a class which only have static members and static functions.
I am using the namespace System.Windows.Forms.DataVisualization.Charting to create a Chart object on a form.
I'm working with a C# project using System.Windows.Form to create the GUI, I have
Suppose I have a search screen that is intended for looking up items. There
I have an app which creates a series of modeless dialog windows which are
If I create a table with datetime default getdate() field that is intended to
In a Delphi app intended to build an internet software update service for my
My application is intended to work almost entirely through a Windows 7 taskbar item
I have intended to have an app. where I want to have different things
I'm using Delphi 7 and can't predict the target version of Windows. I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.