public void InitializeWindow(int width, int height) { string yaml = $@" themes: default: window: box: padding: {WindowPadding} margin: {WindowMargin} border: size: {WindowBorder} panel: box: padding: {PanelPadding} margin: {PanelMargin} border: size: {PanelBorder} label: box: padding: {LabelPadding} margin: {LabelMargin} border: size: {LabelBorder} facets: main: - name: window type: window position: {WindowPosition.X} {WindowPosition.Y} size: {width} {height} children: - name: container_1 type: panel children: - name: label_1 type: label text: hello - name: label_2 type: label text: hello, world - name: label_3 type: label text: hello your face - name: container_2 type: panel children: - name: label_4 type: label text: dogs are the best - name: label_5 type: label text: cats suck "; var fileProvider = new FakeReadFileProvider(); fileProvider.Add("resources.yaml", yaml); var resourceDataModel = new ResourceDataLoader(fileProvider) .Load("resources.yaml"); Resources = new AgateResourceManager(resourceDataModel); Facet = new TestFacet(); Resources.UserInterface.InitializeFacet(Facet); LayoutEngine = Facet.InterfaceRoot.LayoutEngine; Adapter = Facet.InterfaceRoot.Renderer.Adapter; LayoutEngine.UpdateLayout(Facet.InterfaceRoot); }