Modeling Apps using AppBuilder

In Bloqs, you can model new applications directly from code using the AppBuilder. This allows you to define the app’s name, display name, colors, and avatar programmatically.

Example

const string color = "#1f5ad2";

var builder = new AppBuilder(
    new AppDetails
    {
        Name = "myapp",                           // internal app name
        Title = "My App",                         // human-readable display name
        PrimaryColor = "#323889",                 // primary color
        SecondaryColor = "#e99333",               // secondary color
        Avatar = "SA",                            // avatar
        HomePageId = AppConstants.Pages.HomePage, // specify home page
    }
);

Explanation

  • "myapp" – The internal identifier for your application.

  • "My App" – Human-friendly display name.

  • color – Primary and secondary colors for the app UI.

  • GetAvatar(appName) – Sets an optional avatar for the app.

Last updated