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

[getting-started.md] fixes for English grammar and flow #1210

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
19 changes: 8 additions & 11 deletions docs/documentation/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

## Adding dictionaries

[XAML](https://docs.microsoft.com/en-us/dotnet/desktop/wpf/xaml/?view=netdesktop-6.0), and hence WPF, operate on resource dictionaries. These are HTML-like files that describe the appearance and various aspects of the [controls](https://wpfui.lepo.co/documentation/controls).
**WPF UI** adds its own sets of these files to tell the application how the controls should look like.
[XAML](https://docs.microsoft.com/en-us/dotnet/desktop/wpf/xaml/?view=netdesktop-6.0), and hence WPF, operate on resource dictionaries. These are HTML-like files that describe the appearance and various aspects of the [controls](https://wpfui.lepo.co/documentation/controls). **WPF UI** adds its own sets of these files to tell the application how the controls should look.

There should be a file called `App.xaml` in your new application. Add new dictionaries to it using **WPF UI** `ControlsDictionary` and `ThemesDictionary` classes:

Expand All @@ -20,16 +19,13 @@ There should be a file called `App.xaml` in your new application. Add new dictio
</ResourceDictionary>
</Application.Resources>
</Application>

```

You can choose a color theme here,
`Light` or `Dark`.
Notice that the `ThemeDictionary` lets you choose a color theme, `Light` or `Dark`.

## The main window

There should be a `MainWindow.xaml` file in your newly created application.
It contains the arrangement of the controls used and their parameters.
There should be a `MainWindow.xaml` file in your newly created application. It contains the arrangement of the controls used and their parameters.

```xml
<Window x:Class="WpfApp1.MainWindow"
Expand All @@ -46,7 +42,7 @@ It contains the arrangement of the controls used and their parameters.
</Window>
```

You can add a new namespace to this window to tell the interpreter that you will be using controls from somewhere, like the **WPF UI** library.
Add the **WPF UI** library namespace to this window to tell the XAML compiler that you will be using controls from the library.

```xml
<Window
Expand All @@ -56,7 +52,7 @@ You can add a new namespace to this window to tell the interpreter that you will

## Adding controls

To add a new control from the **WPF UI** library, you just need to enter its class name, prefixing it with the `ui:` prefix:
To add a new control from the **WPF UI** library, just enter its class name, prefixing it with the `ui:` prefix:

```xml
<Window x:Class="WpfApp1.MainWindow"
Expand All @@ -76,5 +72,6 @@ To add a new control from the **WPF UI** library, you just need to enter its cla

# Well...

That's it when it comes to the basics, information about individual controls can be found in [documentation](https://wpfui.lepo.co/documentation/), rules for building a WPF application can be found in the [official Microsoft documentation](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/styles-templates-overview?view=netdesktop-6.0). You can check out [**how to build MVVM applications** here](https://learn.microsoft.com/en-us/windows/communitytoolkit/mvvm/puttingthingstogether).
If you think this documentation sucks, [help improve it here](https://github.com/lepoco/wpfui/tree/development/docs/tutorial).
That's it when it comes to the basics, information about individual controls can be found in [documentation](https://wpfui.lepo.co/documentation/). Rules for building a WPF application can be found in the [official Microsoft documentation](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/styles-templates-overview?view=netdesktop-6.0). You can check out [**how to build MVVM applications** here](https://learn.microsoft.com/en-us/windows/communitytoolkit/mvvm/puttingthingstogether).

If you think this documentation needs improvement, please [help improve it here](https://github.com/lepoco/wpfui/tree/development/docs/tutorial).
Loading