Skip to content

Commit eae98ee

Browse files
authored
(#165) Docs for Avalonia Sample (#166)
1 parent 4a21883 commit eae98ee

File tree

43 files changed

+1011
-581
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1011
-581
lines changed

docs/content/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description = "A set of .NET libraries for synchronizing data between cloud and
88

99
The Datasync Community Toolkit is a free [dotnet Foundation] [Community Toolkit] set of libraries that assists in providing offline data to your desktop and mobile applications. The data is stored in the cloud and synchronized to a local Sqlite database.
1010

11-
{{% badge style="primary" title="Version" %}}8.0.3{{% /badge %}}
11+
{{% badge style="primary" title="Version" %}}8.0.4{{% /badge %}}
1212

1313
## Get started
1414

docs/content/samples/_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ There are a variety of samples in the [samples folder](https://github.com/Commun
1919

2020
* [AvaloniaUI](./todoapp/avalonia.md)
2121
* [MAUI](./todoapp/maui.md)
22-
* [Uno Platform](./todoapp/uno.md)
2322
* [WinUI3](./todoapp/winui3.md)
2423
* [WPF](./todoapp/wpf.md)

docs/content/samples/todoapp/_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ title = "Todo App"
66

77
* [AvaloniaUI](./avalonia.md)
88
* [MAUI](./maui.md)
9-
* [Uno Platform](./uno.md)
109
* [WinUI3](./winui3.md)
1110
* [WPF](./wpf.md)
1211

docs/content/samples/todoapp/avalonia.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,33 @@
22
title = "Avalonia"
33
+++
44

5+
> [!INFO]
6+
> The Avalonia sample has been kindly contributed to the community by <a href="https://github.com/timunie">@timunie</a>.
7+
58
## Run the application first
69

7-
The Avalonia sample uses an in-memory Sqlite store for storing its data. The sample can run on Desktop, Mobile and Browser. To run the application locally:
10+
The Avalonia sample uses an in-memory Sqlite store for storing its data. To run the application locally:
811

9-
* [Configure Visual Studio for Avalonia development](https://docs.avaloniaui.net/docs/welcome).
12+
* [Configure Visual Studio for Avalonia development](https://docs.avaloniaui.net/docs/get-started).
1013
* Open `samples/todoapp/Samples.TodoApp.sln` in Visual Studio.
11-
* In the Solution Explorer, expand the folder `TodoApp.Avalonia` and right-click the `TodoApp.Avalonia.Desktop` project, then select **Set as Startup Project**.
14+
* In the Solution Explorer, expand the `TodoApp.Avalonia` folder, then right-click the `TodoApp.Avalonia.Desktop` project, then select **Set as Startup Project**.
1215
* Select a target (in the top bar), then press F5 to run the application.
1316

14-
> [!TIP]
15-
> We suggest to start testing and debugging using the Desktop App first. Once you feel confident, you can also try out Mobile or Browser version.
17+
If you bump into issues at this point, ensure you can properly develop and run Avalonia applications for the desktop outside of the datasync service.
1618

17-
> [!NOTE]
18-
> If you bump into issues at this point, please visit [Avalonia.Docs](https://docs.avaloniaui.net) and [Avalonia.Samples](https://github.com/AvaloniaUI/Avalonia.Samples) for some basic getting-started tutorials.
19+
> [!TIP]
20+
> The TodoApp.Avalonia sample is known to work on Android and Desktop. We have not tested on other platforms.
1921
2022
This is how the sample will look like:
2123
![Avalonia sample on Desktop](assets/TodoApp.Avalonia.Desktop.png)
2224

23-
2425
## Deploy a datasync server to Azure
2526

2627
Before you begin adjusting the application for offline usage, you must [deploy a datasync service](../server.md). Make a note of the URI of the service before continuing.
2728

2829
## Update the application for datasync operations
2930

30-
All the changes are isolated to the `Database/AppDbContext.cs` file.
31+
All the changes are isolated to the `Database/AppDbContext.cs` file in the `TodoApp.Avalonia` shared project.
3132

3233
1. Change the definition of the class so that it inherits from `OfflineDbContext`:
3334

@@ -77,4 +78,7 @@ All the changes are isolated to the `Database/AppDbContext.cs` file.
7778

7879
You can now re-run your application. Watch the console logs to show the interactions with the datasync service. Press the refresh button to synchronize data with the cloud. When you restart the application, your changes will automatically populate the database again.
7980

81+
> [!TIP]
82+
> The first synchronization can take a while because of the cold-start of the service. Watch the debug output to see the synchronization happening.
83+
8084
Obviously, you will want to do much more in a "real world" application, including proper error handling, authentication, and using a Sqlite file instead of an in-memory database. This example shows off the minimum required to add datasync services to an application.

docs/content/samples/todoapp/maui.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ The MAUI sample uses an in-memory Sqlite store for storing its data. To run the
1111
* In the Solution Explorer, right-click the `TodoApp.MAUI` project, then select **Set as Startup Project**.
1212
* Select a target (in the top bar), then press F5 to run the application.
1313

14-
The application runs on Android, iOS, and Windows. Each platform needs slightly different setup. Read the MAUI documentation for more information.
14+
The application should run on Android, iOS, and Windows. Each platform needs slightly different setup. Read the MAUI documentation for more information.
15+
16+
> [!TIP]
17+
> The TodoApp.MAUI sample is known to work on Android and Desktop. We have not tested on other platforms.
1518
1619
## Deploy a datasync server to Azure
1720

@@ -69,4 +72,7 @@ All the changes are isolated to the `Database/AppDbContext.cs` file.
6972

7073
You can now re-run your application. Watch the console logs to show the interactions with the datasync service. Press the refresh button to synchronize data with the cloud. When you restart the application, your changes will automatically populate the database again.
7174

75+
> [!TIP]
76+
> The first synchronization can take a while because of the cold-start of the service. Watch the debug output to see the synchronization happening.
77+
7278
Obviously, you will want to do much more in a "real world" application, including proper error handling, authentication, and using a Sqlite file instead of an in-memory database. This example shows off the minimum required to add datasync services to an application.

docs/content/samples/todoapp/winui3.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,7 @@ All the changes are isolated to the `Database/AppDbContext.cs` file.
6969

7070
You can now re-run your application. Watch the console logs to show the interactions with the datasync service. Press the refresh button to synchronize data with the cloud. When you restart the application, your changes will automatically populate the database again.
7171

72+
> [!TIP]
73+
> The first synchronization can take a while because of the cold-start of the service. Watch the debug output to see the synchronization happening.
74+
7275
Obviously, you will want to do much more in a "real world" application, including proper error handling, authentication, and using a Sqlite file instead of an in-memory database. This example shows off the minimum required to add datasync services to an application.

docs/content/samples/todoapp/wpf.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,7 @@ All the changes are isolated to the `Database/AppDbContext.cs` file.
6969

7070
You can now re-run your application. Watch the console logs to show the interactions with the datasync service. Press the refresh button to synchronize data with the cloud. When you restart the application, your changes will automatically populate the database again.
7171

72+
> [!TIP]
73+
> The first synchronization can take a while because of the cold-start of the service. Watch the debug output to see the synchronization happening.
74+
7275
Obviously, you will want to do much more in a "real world" application, including proper error handling, authentication, and using a Sqlite file instead of an in-memory database. This example shows off the minimum required to add datasync services to an application.

docs/public/404.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head><script src="/Datasync/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=Datasync/livereload" data-no-instant defer></script>
44
<meta charset="utf-8">
55
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
6-
<meta name="generator" content="Hugo 0.137.1">
6+
<meta name="generator" content="Hugo 0.139.0">
77
<meta name="generator" content="Relearn 6.2.0+tip">
88
<meta name="description" content="">
99
<meta name="author" content="">
@@ -20,17 +20,17 @@
2020
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
2121
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
2222
<link rel="manifest" href="/favicon/site.webmanifest">
23-
<link href="/Datasync/css/fontawesome-all.min.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1731686403" rel="stylesheet"></noscript>
24-
<link href="/Datasync/css/nucleus.css?1731686403" rel="stylesheet">
25-
<link href="/Datasync/css/auto-complete.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1731686403" rel="stylesheet"></noscript>
26-
<link href="/Datasync/css/perfect-scrollbar.min.css?1731686403" rel="stylesheet">
27-
<link href="/Datasync/css/fonts.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1731686403" rel="stylesheet"></noscript>
28-
<link href="/Datasync/css/theme.css?1731686403" rel="stylesheet">
29-
<link href="/Datasync/css/theme-auto.css?1731686403" rel="stylesheet" id="R-variant-style">
30-
<link href="/Datasync/css/chroma-auto.css?1731686403" rel="stylesheet" id="R-variant-chroma-style">
31-
<link href="/Datasync/css/variant.css?1731686403" rel="stylesheet">
32-
<link href="/Datasync/css/print.css?1731686403" rel="stylesheet" media="print">
33-
<script src="/Datasync/js/variant.js?1731686403"></script>
23+
<link href="/Datasync/css/fontawesome-all.min.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1734123542" rel="stylesheet"></noscript>
24+
<link href="/Datasync/css/nucleus.css?1734123542" rel="stylesheet">
25+
<link href="/Datasync/css/auto-complete.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1734123542" rel="stylesheet"></noscript>
26+
<link href="/Datasync/css/perfect-scrollbar.min.css?1734123542" rel="stylesheet">
27+
<link href="/Datasync/css/fonts.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1734123542" rel="stylesheet"></noscript>
28+
<link href="/Datasync/css/theme.css?1734123542" rel="stylesheet">
29+
<link href="/Datasync/css/theme-auto.css?1734123542" rel="stylesheet" id="R-variant-style">
30+
<link href="/Datasync/css/chroma-auto.css?1734123542" rel="stylesheet" id="R-variant-chroma-style">
31+
<link href="/Datasync/css/variant.css?1734123542" rel="stylesheet">
32+
<link href="/Datasync/css/print.css?1734123542" rel="stylesheet" media="print">
33+
<script src="/Datasync/js/variant.js?1734123542"></script>
3434
<script>
3535
window.relearn = window.relearn || {};
3636
window.relearn.relBasePath='.';

docs/public/categories/index.html

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head><script src="/Datasync/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=Datasync/livereload" data-no-instant defer></script>
44
<meta charset="utf-8">
55
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
6-
<meta name="generator" content="Hugo 0.137.1">
6+
<meta name="generator" content="Hugo 0.139.0">
77
<meta name="generator" content="Relearn 6.2.0+tip">
88
<meta name="description" content="">
99
<meta name="author" content="">
@@ -20,17 +20,17 @@
2020
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
2121
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
2222
<link rel="manifest" href="/favicon/site.webmanifest">
23-
<link href="/Datasync/css/fontawesome-all.min.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1731686403" rel="stylesheet"></noscript>
24-
<link href="/Datasync/css/nucleus.css?1731686403" rel="stylesheet">
25-
<link href="/Datasync/css/auto-complete.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1731686403" rel="stylesheet"></noscript>
26-
<link href="/Datasync/css/perfect-scrollbar.min.css?1731686403" rel="stylesheet">
27-
<link href="/Datasync/css/fonts.css?1731686403" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1731686403" rel="stylesheet"></noscript>
28-
<link href="/Datasync/css/theme.css?1731686403" rel="stylesheet">
29-
<link href="/Datasync/css/theme-auto.css?1731686403" rel="stylesheet" id="R-variant-style">
30-
<link href="/Datasync/css/chroma-auto.css?1731686403" rel="stylesheet" id="R-variant-chroma-style">
31-
<link href="/Datasync/css/variant.css?1731686403" rel="stylesheet">
32-
<link href="/Datasync/css/print.css?1731686403" rel="stylesheet" media="print">
33-
<script src="/Datasync/js/variant.js?1731686403"></script>
23+
<link href="/Datasync/css/fontawesome-all.min.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fontawesome-all.min.css?1734123542" rel="stylesheet"></noscript>
24+
<link href="/Datasync/css/nucleus.css?1734123542" rel="stylesheet">
25+
<link href="/Datasync/css/auto-complete.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/auto-complete.css?1734123542" rel="stylesheet"></noscript>
26+
<link href="/Datasync/css/perfect-scrollbar.min.css?1734123542" rel="stylesheet">
27+
<link href="/Datasync/css/fonts.css?1734123542" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/Datasync/css/fonts.css?1734123542" rel="stylesheet"></noscript>
28+
<link href="/Datasync/css/theme.css?1734123542" rel="stylesheet">
29+
<link href="/Datasync/css/theme-auto.css?1734123542" rel="stylesheet" id="R-variant-style">
30+
<link href="/Datasync/css/chroma-auto.css?1734123542" rel="stylesheet" id="R-variant-chroma-style">
31+
<link href="/Datasync/css/variant.css?1734123542" rel="stylesheet">
32+
<link href="/Datasync/css/print.css?1734123542" rel="stylesheet" media="print">
33+
<script src="/Datasync/js/variant.js?1734123542"></script>
3434
<script>
3535
window.relearn = window.relearn || {};
3636
window.relearn.relBasePath='..';
@@ -163,12 +163,12 @@ <h1 id="categories">Categories</h1>
163163
<script>
164164
var contentLangs=['en'];
165165
</script>
166-
<script src="/Datasync/js/auto-complete.js?1731686403" defer></script>
167-
<script src="/Datasync/js/lunr/lunr.min.js?1731686403" defer></script>
168-
<script src="/Datasync/js/lunr/lunr.stemmer.support.min.js?1731686403" defer></script>
169-
<script src="/Datasync/js/lunr/lunr.multi.min.js?1731686403" defer></script>
170-
<script src="/Datasync/js/lunr/lunr.en.min.js?1731686403" defer></script>
171-
<script src="/Datasync/js/search.js?1731686403" defer></script>
166+
<script src="/Datasync/js/auto-complete.js?1734123542" defer></script>
167+
<script src="/Datasync/js/lunr/lunr.min.js?1734123542" defer></script>
168+
<script src="/Datasync/js/lunr/lunr.stemmer.support.min.js?1734123542" defer></script>
169+
<script src="/Datasync/js/lunr/lunr.multi.min.js?1734123542" defer></script>
170+
<script src="/Datasync/js/lunr/lunr.en.min.js?1734123542" defer></script>
171+
<script src="/Datasync/js/search.js?1734123542" defer></script>
172172
</div>
173173
<div id="R-homelinks" class="default-animation homelinks">
174174
<ul>
@@ -185,6 +185,7 @@ <h1 id="categories">Categories</h1>
185185
<li data-nav-id="/Datasync/samples/index.html" class=""><a class="padding" href="/Datasync/samples/index.html">Samples</a><ul id="R-subsections-cd759c081a923a28fc364a7ca7ecc995" class="morespace collapsible-menu">
186186
<li data-nav-id="/Datasync/samples/server/index.html" class=""><a class="padding" href="/Datasync/samples/server/index.html">Sample Server</a></li>
187187
<li data-nav-id="/Datasync/samples/todoapp/index.html" class="alwaysopen"><a class="padding" href="/Datasync/samples/todoapp/index.html">Todo App</a><ul id="R-subsections-7781a542dc3f3e4e1a99b48a99d4c605" class="morespace collapsible-menu">
188+
<li data-nav-id="/Datasync/samples/todoapp/avalonia/index.html" class=""><a class="padding" href="/Datasync/samples/todoapp/avalonia/index.html">Avalonia</a></li>
188189
<li data-nav-id="/Datasync/samples/todoapp/maui/index.html" class=""><a class="padding" href="/Datasync/samples/todoapp/maui/index.html">MAUI</a></li>
189190
<li data-nav-id="/Datasync/samples/todoapp/winui3/index.html" class=""><a class="padding" href="/Datasync/samples/todoapp/winui3/index.html">WinUI3</a></li>
190191
<li data-nav-id="/Datasync/samples/todoapp/wpf/index.html" class=""><a class="padding" href="/Datasync/samples/todoapp/wpf/index.html">WPF</a></li></ul></li></ul></li>
@@ -252,8 +253,8 @@ <h1 id="categories">Categories</h1>
252253
</div>
253254
</div>
254255
</aside>
255-
<script src="/Datasync/js/clipboard.min.js?1731686403" defer></script>
256-
<script src="/Datasync/js/perfect-scrollbar.min.js?1731686403" defer></script>
257-
<script src="/Datasync/js/theme.js?1731686403" defer></script>
256+
<script src="/Datasync/js/clipboard.min.js?1734123542" defer></script>
257+
<script src="/Datasync/js/perfect-scrollbar.min.js?1734123542" defer></script>
258+
<script src="/Datasync/js/theme.js?1734123542" defer></script>
258259
</body>
259260
</html>

docs/public/css/chroma-auto.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
@import "chroma-relearn-light.css?1731686403" screen and (prefers-color-scheme: light);
2-
@import "chroma-relearn-dark.css?1731686403" screen and (prefers-color-scheme: dark);
1+
@import "chroma-relearn-light.css?1734123542" screen and (prefers-color-scheme: light);
2+
@import "chroma-relearn-dark.css?1734123542" screen and (prefers-color-scheme: dark);

0 commit comments

Comments
 (0)