25
Aug
07

Docking an ApplicationControlBar container

The following example shows how you can dock an ApplicationControlBar container by setting its dock property to true. Yes, this is perhaps the shortest and most boring example ever. Enjoy!

Full code after the jump.

View MXML

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/08/25/docking-an-applicationcontrolbar-container/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:ApplicationControlBar dock="{checkBox.selected}">
        <mx:CheckBox id="checkBox" label="dock" />
    </mx:ApplicationControlBar>

</mx:Application>

View source is enabled in the following example.


2 Responses to “Docking an ApplicationControlBar container”


  1. 1 DCHall Sep 7th, 2007 at 9:47 am

    First I have to say, you rock for posting these examples. I have been doing web development for 6 years and have worked on an off in Flash during that time. So I know a lot of the basics but I am more of a design guy. I have now been pushed to work with flex/air for a couple of projects when I came across your site. Great example walkthrough’s! Your site alone has got me up and running in a short time.

    Now to my question… Would this example also work docking if you we not using flex chrome/window or windows chrome. Example. I am making an application that would basicly dock to the top/screen or taskbar on launch. Then when clicking the control bar a canvas will slide up or down depending on location on screen. I hope I am explaining that right.

  2. 2 peterd Sep 7th, 2007 at 9:56 am

    DCHall,

    I haven’t had a chance to play with AIR very thoroughly yet and haven’t tried doing that yet.

    Sorry,
    Peter

Leave a Reply

This blog is terrible at eating HTML tags. If you plan on posting code/XML, please escape your "<" characters as "&lt;" and your ">" characters as "&gt;".




Badge Farm

  • Firefox 2
  • Powered by Redoable 1.2
  • Feeds burnt by Feedburner
  • Feed