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.

4 thoughts on “Docking an ApplicationControlBar container

  1. 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. This blog is really useful for new flex users. Because, it helps them in a great deal.
    So, I just would like to appreciate the website owner to build such an innovative and informative Web Site.
    Thanks,
    Asif Bilal
    Pakistan

Comments are closed.