Windows 8 Style App Bar

4 posts, 0 answers
  1. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 07 Feb 2013 Link to this post

    Hi

    How would you create a Windows 8 look alike "app bar" that Shows/Hides under program control. 

    Thanks
    Rich
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 12 Feb 2013 Link to this post

    Hello Richard,

    Thank you for writing.

    We do not provide specific control that could be used for this purpose. One option is to use RadPanel and change its size and position. Here is a sample:
    RadButton b = new RadButton();
    b.Location = new Point(50, 50);
    b.Text = "click";
    b.Click += new EventHandler(b_Click);
    Controls.Add(b);
     
    RadPanel panel = new RadPanel();
    panel.Size = new Size(this.ClientSize.Width, 0);
    panel.Location = new Point(0, this.ClientSize.Height);
    panel.Controls.Add(new RadButton() { Location = new Point(10, 10), Text = "button" });
    Controls.Add(panel);
     
    void b_Click(object sender, EventArgs e)
    {
        Timer timer = new Timer();
        timer.Interval = 10;
        timer.Tick += new EventHandler(timer_Tick);
        timer.Start();
    }
     
    void timer_Tick(object sender, EventArgs e)
    {
        Timer timer = (Timer)sender;
        if (panel.Size.Height < 100)
        {
            panel.Size = new Size(this.ClientSize.Width, panel.Size.Height + 10);
            panel.Location = new Point(0, this.ClientSize.Height - panel.Size.Height);
        }
        else
        {
            timer.Stop();
            timer.Dispose();
        }
    }

    However, your inquiry seems interesting and I added this as a feature request in our issue tracking system. You can track its status by following this link. I updated also your Telerik points.

    Should you have further questions, do not hesitate to ask.
     
    Kind regards,
    Jack
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 12 Feb 2013 Link to this post

    Hi Jack,

    That worked pretty well.  I liked your technique for providing animation.

    Other Things to-do:

    Set panel.BringToFront() to hide controls underneath the panel. 

    On unused space on form:
        Right mouse click shows/hides panel.   (What about context menu?)
        Left mouse click hides panel.
       
    On Unused space on panel:
        Right mouse click hides panel.  (What about context menu?)

    Does this make any sense?

    Thanks
    Rich
  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 14 Feb 2013 Link to this post

    Hello Richard,

    I am glad that I could help. Regarding your to-do questions, you can setb the panel's Visible property to false in order to hide it. Another option is to set its Height property to 0. I am not sure about the context menu question, you can use for example RadContextMenu to show a context menu on right button click. Find further details in our online documentation. If this is not what you want, please describe the expected behavior in detail. I will be glad to help further.
     
    Greetings,
    Jack
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Back to Top