Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/Reactor.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,13 @@ int CreateProject(string name)

string GenerateProgram(string name) =>
$$"""
using System;
using Microsoft.UI.Reactor;
using Microsoft.UI.Reactor.Core;
using Microsoft.UI.Reactor.Layout; // FlexDirection, FlexJustify, FlexAlign
using Microsoft.UI.Xaml; // Thickness, HorizontalAlignment, VerticalAlignment
using Microsoft.UI.Xaml.Controls; // Orientation, InfoBarSeverity, etc.
using static Microsoft.UI.Reactor.Factories;
using Microsoft.UI.Xaml;

ReactorApp.Run<App>("{{name}}", width: 800, height: 600
#if DEBUG
Expand All @@ -273,7 +276,11 @@ class App : Component
{
public override Element Render()
{
return TextBlock("Hello, World!").FontSize(24).Margin(20);
var titleBar = TitleBar("{{name}}").Flex(shrink: 0);
var content = Border(
TextBlock("Hello, World!").FontSize(24)
).Padding(24);
return FlexColumn(titleBar, content);
}
}
""";
Expand Down
Loading