using backgroundFill in BorderContainer

Simple example which shows how to use backgroundFill with BorderContainer


<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark">

    <s:BorderContainer cornerRadius="10" width="100%" height="100%">
        <s:backgroundFill>
            <s:SolidColor
                color="0xFF00FF"  alpha="1"/>
        </s:backgroundFill>

        <s:Label text="sample text" />

    </s:BorderContainer> 

</s:Application>

using spark List with ArrayCollection


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


India
Russia
Srilanka
Canada
Spain
Italy


using LinearGradient in spark flex


<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
			   xmlns:mx="library://ns.adobe.com/flex/mx"
			   xmlns:s="library://ns.adobe.com/flex/spark"
			   width="200" height="200"
			   left="20" right="20"
			   top="20" bottom="20">
		<s:Rect x="0" y="0"
				height="100%" width="100%">
			<s:fill>
				<s:LinearGradient>
					<s:entries>
						<mx:GradientEntry color="0xFF0000"/>
						<mx:GradientEntry color="0x00FF00"/>
						<mx:GradientEntry color="0x0000FF"/>
					</s:entries>
				</s:LinearGradient>
			</s:fill>
		</s:Rect>
</s:Application>

Using Background Image with Spark BorderContainer

Very simple example shows how to use Background Image with Spark Container


<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark"> 

    <fx:Script>
        <![CDATA[

	    [Bindable]
            [Embed(source="sampleImage.jpg")]
            public var ImageSample:Class;
        ]]>
    </fx:Script> 

    <s:BorderContainer
        backgroundImage="{ImageSample}"
        width="100%" height="100%">
    </s:BorderContainer>
</s:Application>

using Spark BorderContainer

Simple Example which shows you how to use border container in spark

Just I have inserted simple label inside container


<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark"> 

    <s:BorderContainer
        backgroundColor="red" cornerRadius="10"
        borderStyle="inset" borderWeight="4" >
        <s:Label text="Some text here" />
    </s:BorderContainer>
</s:Application>

Setting Vertical Layout for Application tag in Spark

Following example shows how to setup vertical layout in spark application tag


<?xml version="1.0" encoding="utf-8"?>
<s:Application	 xmlns:fx="http://ns.adobe.com/mxml/2009"
   		 xmlns:mx="library://ns.adobe.com/flex/mx"
   		 xmlns:s="library://ns.adobe.com/flex/spark"> 

        <s:layout>
            <s:VerticalLayout
                paddingLeft="5" paddingRight="5"
                paddingTop="5" paddingBottom="5"/>
        </s:layout>

        <s:Button label="Sample1"/>
        <s:Button label="Sample2"/>
        <s:Button label="Sample3"/>
        <s:Button label="Sample4"/>

</s:Application>