-
Notifications
You must be signed in to change notification settings - Fork 0
BehaviorSheet
seanhess edited this page Sep 13, 2010
·
24 revisions
You can use the BehaviorSheet tag to create a BehaviorMap from a css style sheet.
You can set properties, styles and behaviors for any matched components. This supports the full range of Selectors and just creates a Set tag for each css rule. It also allows you to associate behaviors by class reference. Note that none of this is unique to BehaviorSheet. BehaviorMap can do anything this can, and much more, but it uses an MXML syntax instead of css.
Please remember that behaviors are associated after creation complete, so using this to set styles will override any inline settings in your app.
<!-- BehaviorSheetExample.mxml -->
<BehaviorSheet url="styles/test.css" target="{this}"/>
/* test.css */
Button#henry
{
height: 300;
font-size: 72;
label: "I am a button";
}
.panel Button
{
width: 300;
behavior: net.seanhess.bifff.behaviors.TestClick;
behavior: net.seanhess.bifff.behaviors.Trace(message:"hello");
}