Skip to content

Commit

Permalink
Merge pull request #1207 from beto-rodriguez/dev
Browse files Browse the repository at this point in the history
Syncs docs with site.
  • Loading branch information
beto-rodriguez authored Sep 2, 2023
2 parents c9b53a0 + 68a6dde commit 5dcc732
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 10 deletions.
44 changes: 43 additions & 1 deletion docs/samples/bars/custom/template.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
{{ render this "~/shared/genericSampleSimple.md" }}
{{ render this "~/shared/genericSampleSimpleHeader.md" }}

## View model

```
{{ full_name | get_vm_from_docs }}
```

## MyGeometry.cs

{{~ "~/../samples/ViewModelsSamples/Lines/Custom/MyGeometry.cs" | render_file_as_code ~}}

{{~ if xaml ~}}
## XAML
{{~ end ~}}

{{~ if winforms ~}}
## Form code behind
{{~ end ~}}

{{~ if blazor~}}
## HTML
{{~ end~}}

```
{{ full_name | get_view_from_docs }}
```

{{~ if related_to != null ~}}

### Articles you might also find useful:

{{~ for r in related_to ~}}

<div>
<a href="{{ compile this r.url }}">
{{ r.name }}
</a>
</div>

{{~ end ~}}

{{~ end ~}}
Binary file added docs/samples/error/basic/all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 61 additions & 7 deletions docs/samples/error/basic/template.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,66 @@
{{ render this "~/shared/genericSampleSimple.md" }}
# {{ name | to_title_case }}

### Error bard in line series
{{~ if xaml ~}}

In the previous sample you can replace the `ColumnSeries<ErrorValue>` with `LineSeries<ErrorValue>` to create
a line chart with error bars:
:::info
The `[ObservableObject]`, `[ObservableProperty]` and `[RelayCommand]` attributes come from the
[CommunityToolkit.Mvvm](https://www.nuget.org/packages/CommunityToolkit.Mvvm/) package, you can read more about it
[here]({{ website_url }}/docs/{{ platform }}/{{ version }}/About.About%20this%20samples).
:::

<div class="position-relative text-center">
<img src="{{ assets_url }}/docs/{{ unique_name }}/result2.png" alt="sample image 2" />
{{~ end ~}}

{{~ if wpf || avalonia || uno || winui ~}}

:::info
This web site wraps every sample using a `UserControl` instance, but LiveCharts controls can be used inside any container.
:::

{{~ end ~}}


{{~ if xamarin || maui ~}}

:::info
This web site wraps every sample using a `ContentPage` instance, but LiveCharts controls can be used inside any container.
:::

{{~ end ~}}


{{~ if winforms ~}}

:::info
This web site builds the control from code behind but you could also grab it from the toolbox,
this sample also uses a ViewModel to populate the properties of the control(s) in this sample.
:::

{{~ end ~}}

<div class="text-center">
<img src="{{ assets_url }}/docs/{{ unique_name }}/all.png" alt="sample image" />
</div>

In the previous image, the `Fill`, `GeometryFill` and `GeometryStroke` properties are `null`.
## View model

```
{{ full_name | get_vm_from_docs }}
```

{{~ if xaml ~}}
## XAML
{{~ end ~}}

{{~ if winforms ~}}
## Form code behind
{{~ end ~}}

{{~ if blazor~}}
## HTML
{{~ end~}}

```
{{ full_name | get_view_from_docs }}
```

{{ render this "~/shared/relatedTo.md" }}
Binary file added docs/samples/general/mapPoints/result.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions samples/MauiSample/General/MultiThreading2/View.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public View()
// to invoke an action in the UI thred.
private void InvokeOnUIThread(Action action)
{
// throws on win ui
// https://github.com/dotnet/maui/issues/2451
MainThread.BeginInvokeOnMainThread(action);
}
}

0 comments on commit 5dcc732

Please sign in to comment.