0 Replies Latest reply on May 1, 2013 10:37 AM by asifdegr8

    ViewMenuItem do not appear when applying custom skin on ViewNavigatorApplication

    asifdegr8 Level 1

      ViewMenuItems works fine when I don't apply skinClass fo ViewNavigatorApplication, but when I apply custom skin to ViewNavigator, ViewMenuItems doesn't appear.

      Here is my main file

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"

                                  xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.DriveSafeHomeView" applicationDPI="160"

                                   initialize="applyRuntimeStyleSheet()" skinClass="skins.CustomApplicationSkin" >

          <fx:Declarations>

              <!-- Place non-visual elements (e.g., services, value objects) here -->

          </fx:Declarations>

         

          <fx:Script>

              <![CDATA[

                  public function applyRuntimeStyleSheet():void {

                      styleManager.loadStyleDeclarations("css/Styles.swf")

                          // skinClass="skins.CustomApplicationSkin"

                  }

              ]]>

          </fx:Script>  

      </s:ViewNavigatorApplication>

       

      Code for CustomApplicationSkin.mxml is

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:Skin name="CustomApplicationSkin"

                      xmlns:fx="http://ns.adobe.com/mxml/2009"

                               xmlns:s="library://ns.adobe.com/flex/spark"

                                         >

          

              <fx:Metadata>

                          <![CDATA[

                          [HostComponent("DriveSafe")]

                          ]]>

                      </fx:Metadata>

             

              <s:states>

                          <s:State name="normal" />

                           <s:State name="disabled" />

                       </s:states>

            

              <s:BitmapImage width="100%" height="100%" source="@Embed('/assets/background.jpg')"/>

            

              <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0" />

             

              <s:ViewNavigator id="navigator" width="100%" height="100%" />

         

      </s:Skin>