Sanket
Sanket

Reputation: 3134

Make a page background transparent in cascades

I want to make page background fully transparent in blackberry 10 cascades. How can i do this ??

I tried with following code but it is not working..

Page {
    Container {
        layout: DockLayout {}

        Label {
            text: qsTr("Hello World")
            textStyle.base: SystemDefaults.TextStyles.BigText
            verticalAlignment: VerticalAlignment.Center
            horizontalAlignment: HorizontalAlignment.Center
        }
        opacity : 0
        preferredWidth: 780.0
        preferredHeight: 1280.0
    }

}

Thanks

Upvotes: 1

Views: 789

Answers (2)

Scott
Scott

Reputation: 552

You can't make a Page transparent. Your best bet is to put your content in a Dialog, and set its opacity to 0. This will give you a full screen overlay over the current page.

http://developer.blackberry.com/cascades/reference/bb_cascades_dialog.html

Upvotes: 1

barry
barry

Reputation: 4147

Try:

background: Color.Transparent

in your container.

Upvotes: 2

Related Questions