Skip to content

Commit

Permalink
Misc Fixes (#617)
Browse files Browse the repository at this point in the history
* Add missing code block language

* Fix typo

* Fix syntax error

* Add missing code block language

* Fix wrong code block langauge

* Add missing code block language

* Fix wrong code block language

* Fix wrong code block language

* Fix syntax error in code block

* Fix typos

* Use color instead of colour to be consistent with Avalonia itself
  • Loading branch information
wxMichael authored Feb 14, 2025
1 parent 17cd040 commit d869112
Show file tree
Hide file tree
Showing 59 changed files with 101 additions and 100 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The two suggested workflows are:
When you link to an image, the path and filename are case-sensitive. The convention is `kebab-case`. `import` should be used to help detect broken images and placed near the top of the document for easier maintenance.

> Example code for adding an image in markdown file:
```
```markdown
import ButtonGroup from '/img/button-group.png';
<img className="screenshot-full" src={ButtonGroup} alt="Button group" />
```
Expand All @@ -68,13 +68,13 @@ The two suggested workflows are:

### Setup

```
```bash
npm install
```

### Starting

```
```bash
npx docusaurus start
npx docusaurus start --locale zh-Hans
npx docusaurus start --locale ru
Expand Down
2 changes: 1 addition & 1 deletion docs/basics/data/data-binding/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If the user edits the text in the text box, then the `FirstName` property of the

Bindings can be unidirectional: where changes in the properties of a bound application object are reflected in the control, but the user cannot change the control. An example of this would be the text block control, which is read-only.

```
```xml
<TextBlock Text="{Binding StatusMessage}" />
```

Expand Down
2 changes: 1 addition & 1 deletion docs/basics/user-interface/styling/styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ When a match is located by the selection step, then the matched control's proper

The XAML for a style has two parts: a selector attribute, and one or more setter elements. The selector value contains a string that uses the _Avalonia UI_ **style selector syntax**. Each setter element identifies the property that will be changed by name, and the new value that will be substituted. The pattern is like this:

```
```xml
<Style Selector="selector syntax">
<Setter Property="property name" Value="new value"/>
...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Then the `_sourceCache` can be populated through the `AddOrUpdate` method

## Creating Sorted Or Filtered Views

Next the `ReadOnlyObservableCollection<T>` can be bound to the filtered or sorted `_sourceCache`. The sorting/filtering is done similarly to linq.
Next the `ReadOnlyObservableCollection<T>` can be bound to the filtered or sorted `_sourceCache`. The sorting/filtering is done similarly to Linq.

```csharp
private readonly ReadOnlyObservableCollection<TestViewModel> _testViewModels;
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/reactiveui/reactive-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ When you use _ReactiveUI_ to implement revealed functionality, you create an obs

For example, you can add this code to the above view model constructor (`public MainWindowViewModel()`) to create an observable object to validate the view model:

```
```csharp
IObservable<bool> isInputValid = this.WhenAnyValue(
x => x.UserName,
x => !string.IsNullOrWhiteSpace(x) && x.Length > 7
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/services/insets-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ SafeAreaChangedArgs is a class that provides data for the SafeAreaChanged event.
### SafeAreaPadding
Gets the new safe area padding.

```
```csharp
public Thickness SafeAreaPadding { get; }
```

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/view-locator.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ You can customize the View Locator to use different conventions. For example, yo

By default, the View Locator is referenced in App.axaml as a DataTemplate, in the content of the `Application.DataTemplates` XAML tag. Ensure that its appropriate 'using' statement is in the `xmlns:local` property of the Application root tag.

```xaml
```xml
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="LearningAvalonia.App"
Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/debian-ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Overall, all .NET and Avalonia dependencies are required, plus any others specif

Below is a simple example of a `control` file.

```
```yaml
Package: myprogram
Version: 3.1.0
Section: devel
Expand Down Expand Up @@ -112,7 +112,7 @@ The desktop shortcut file follows the [freedesktop specification](https://specif

Below is an example of a desktop shortcut file.

```
```conf
[Desktop Entry]
Name=MyProgram
Comment=MyProgram, great for doing X
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/macOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ macOS applications are typically distributed in a `.app` [application bundle](ht

With Avalonia, you'll have a `.app` folder structure that looks like this:

```csharp
```
MyProgram.app
|
----Contents\
Expand Down
6 changes: 3 additions & 3 deletions docs/get-started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The project templates will also allow for project creation from your IDE.

### Ensure .NET SDK is installed

```
```bash
dotnet --list-sdks

8.0.202 [C:\Program Files\dotnet\sdk] <-- Your version may vary
Expand All @@ -79,7 +79,7 @@ associated with the terminal. On Windows, this involves checking environment var
If while installing the project templates, you receive an error stating the `Avalonia.Templates` package cannot be found,
then ensure NuGet is correctly setup with .NET's standard global package source.

```
```bash
dotnet nuget list source

Registered Sources:
Expand All @@ -89,7 +89,7 @@ Registered Sources:

If this source is not listed, add it:

```
```bash
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
```

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/test-drive/add-some-layout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ To take the example forward, add a `StackPanel` as follows (include the preexist
```

<ThemedImage
alt="Tempature StackPanel"
alt="Temperature StackPanel"
className="center"
sources={{
light: useBaseUrl('/img/get-started/test-drive/temperature-stackpanel-light.png'),
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/test-drive/input-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The following picture shows the finished application at runtime with the gridlin
these are invisible on a production UI.

<ThemedImage
alt="Tempature StackPanel"
alt="Temperature StackPanel"
className="center"
sources={{
light: useBaseUrl('/img/get-started/test-drive/input-controls-light.png'),
Expand Down
Loading

0 comments on commit d869112

Please sign in to comment.