Skip to main content

Window

Examples#

Basic#

import React from 'react';import { AveRenderer, Window } from 'ave-react';
export function App() {    return <Window></Window>;}
AveRenderer.render(<App />);

Run, and get this basic window:

window basic

API#

export interface IWindowComponentProps extends IComponentProps {    title?: string;    withBackground?: boolean;    withCaption?: boolean;    onInit?: (app: App) => void;    onLanguageChange?: (app: App) => void;}

Transparency#

window opacity

You can implement it this way:

export function App() {    return (        <Window withBackground={false}>            <Grid>                <Grid                    dockMode={DockMode.Fill}                    style={{                        opacity: 0.3,                        backgroundColor: new Vec4(100, 149, 237, 255),                    }}                ></Grid>            </Grid>        </Window>    );}

About grid opacity, see Transparent Grid.