Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docs, bad commit adfbe40 #523

Merged
merged 4 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions docs/get-started/test-drive/add-a-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Avalonia contains a built-in control that creates a button. Follow this procedur
- Stop the app if it is running.
- Locate the
`<TextBlock Text="text" HorizontalAlignment="Center" VerticalAlignment="Center"/>`
in the `MainWindow.axaml` file..
in the `MainView.axaml` file..
- Delete the entire line.
- Insert a 'Button' tag as shown:
```xml
Expand Down Expand Up @@ -54,4 +54,4 @@ The button should now move to the center of the window content zone (both horizo
For full information about the complete range of Avalonia UI built-in controls, and their attributes, see the reference section [here](../../reference/controls).
:::

On the next page, you will learn how to create a more complex layout.
On the next page, you will learn how to create a more complex layout.
8 changes: 4 additions & 4 deletions docs/get-started/test-drive/main-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ In the **MainWindow.axaml** XAML file, the `<Window>...</Window>` XAML tag repre
<img src={LayoutZonesDiagram} alt="" />


## The MainWindow control
## The MainView User Control

Inside **MainWindow.axaml**, you will see a `<TextBlock>...</TextBlock>` XAML tag. This represents a text block control. The `Text` property of the text block is bound to the **Greeting** property of the **MainWindowViewModel** class. This is a property that will be set in the constructor of the view model class.
Inside **MainView.axaml**, you will see a `<TextBlock>...</TextBlock>` XAML tag. This represents a text block control. The `Text` property of the text block is bound to the **Greeting** property of the **MainViewModel** class. This is a property that will be set in the constructor of the view model class.
```
<TextBlock Text="{Binding Greeting}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
```

You can change the text in the file **MainWindowViewModel.cs** to see the change reflected in the user interface.
You can change the text in the file **MainViewModel.cs** to see the change reflected in the user interface.

<img className="center" src={ViewModelScreenshot} alt="" />
<img className="center" src={AppRunningScreenshot} alt="" />
Expand All @@ -41,7 +41,7 @@ For more information about the concept of control layout zones, see [here](../..
## The Visual Studio Designer

If you're using Visual Studio you should see the XAML code and preview pane.
Navigate to the **MainWindow.axaml** file and click the **Split View** button at the top of the editor window.
Navigate to the **MainView.axaml** file and click the **Split View** button at the top of the editor window.

<img className="center" src={VsPreviewerScreenshot} alt="" />

Expand Down