Skip to content

Banner Control

The Banner control offers a couldnt-be-easier solution for displaying slide-out important messages, menus or contextual options. Simply construct your banner layout and assign it to BannerContent and assign your primary layout to the Content property and you're ready to go.

BannerView

Properties

Content - View

This property represents the primary content to display for the view.

BannerContent - View

This property sets the banner's content to display.

DockSide - BannerDockSide

This property defines the side of the view where the banner will dock.

BannerIsVisible - bool

Gets or sets a value indicating whether the banner is visible.

BannerUnderlayColor - Color

Gets or sets the color of the banner underlay.

DismissOnBackgroundPress - bool

Gets or sets a value indicating whether the BannerView dismisses on background press.

Methods

void ToggleBannerVisibility()

Toggles the banner visibility.

void SetContent(View content)

Sets the content for the primary view.

content: Represents the content to be set for the primary view.

void SetBannerContent(View content)

Sets the content for the banner view.

content: Represents the content to be set for the banner view.

Quickstart Example

Xaml

<aurora:BannerView x:Name="bannerView" BannerIsVisible="true">
    <aurora:BannerView.BannerContent>
        <!-- Add Banner Content View Here -->
    </aurora:BannerView.BannerContent>
    <aurora:BannerView.Content>
        <!-- Add Primary Content View Here -->
    </aurora:BannerView.Content>
</aurora:BannerView>

C#

var bannerView = new BannerView 
{
    BannerIsVisible = true,
    BannerContent = // Add banner content here
    Content = // Add Primary content here
};

Options

By default, your banner control will be docked at the top of the view or BannerDockSide.Top. You can specify which side of the view your banner will reveal from by setting the Dockside property using one of the following available options:

public enum BannerDockSide {
    Left,
    Top,
    Right,
    Bottom
} 

You can easily reassign your banner's docking side at any time by setting the Dockside propery in code.

bannerView.DockSide = Aurora.Controls.BannerView.BannerDockSide.Left;