You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> In Mvux werden Models als `record`-Typen definiert, um Unveränderlichkeit und wertbasierte Gleichheit zu nutzen, was für die Zustandsverwaltung in Anwendungen vorteilhaft ist.
41
+
> Die Verwendung von `partial` ist in Mvux Models unerlässlich, um die vom Framework bereitgestellten Code-Generierungsfunktionen zu ermöglichen, wie z.B. automatische Eigenschaftsänderungsbenachrichtigungen und andere Reduzierungen von Boilerplate-Code.
42
+
> [!CAUTION]
43
+
> Genau wie bei regulären C#-Klassen können auch Mvux Models oder Services primäre Konstruktoren haben, die standardmäßig die Parameter als Eigenschaften des Record-Typs erzeugen.
44
+
> Ein potenzieller Nachteil dabei ist, dass ein `INavigator`-Parameter im primären Konstruktor ebenfalls eine Eigenschaft des Models wäre, was normalerweise nicht das ist, was wir als Teil der öffentlichen API unseres Models wollen.
45
+
> Du solltest bevorzugen, diese Service-definierenden Parameter in einem sekundären Konstruktor zu definieren und sie als `private readonly` Felder zu behalten.
> Du kannst in Uno ViewModels oder Models frei den primären Konstruktor verwenden, beachte jedoch, dass bei Verwendung von `Uno.Extensions.Navigation` keine Parameter im *Page*-Konstruktor erlaubt sind.
Copy file name to clipboardExpand all lines: docs/articles/de/Introduction-de.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,21 @@ Hier ein schneller Überblick über die enthaltenen Samples. Detaillierte Infos
29
29
30
30
### XamlNavigationApp (Mvux)
31
31
32
-
-[NavigationView in MVUX oder MVVM + XAML](xref:DevTKSS.Uno.ExtensionsNavigation.Overview.de)
32
+
-[NavigationView in MVUX oder MVVM + XAML - Übersicht](xref:DevTKSS.Uno.ExtensionsNavigation.Overview.de) - [Showcase Video ansehen auf Youtube](https://youtu.be/vVvnK02r2ug)
33
+
-[Definieren des UI mit einer NavigationView](xref:DevTKSS.Uno.ExtensionsNavigation.HowTo-Defining-UI.de) - [Tutorial ansehen auf Youtube](https://youtu.be/knt2oOjHH30)
34
+
-[Reagieren auf Routen Änderungen](xref:DevTKSS.Uno.ExtensionsNavigation.HowTo-ChangeRoutes.de) - [Tutorial ansehen auf Youtube](https://youtu.be/RZ3RirA7jhk)
Copy file name to clipboardExpand all lines: docs/articles/de/Navigation/HowTo-UpgradeExistingApp-de.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,10 @@ In der Projektdatei, zu erkennen an der Endung `.csproj`, brauchst du dafür neb
36
36
37
37
> [!TIP]
38
38
> Das `Toolkit` Feature wird nur benötigt, wenn Navigations-Steuerelemente wie `TabBar` oder `DrawerControl` verwendet werden sollen.
39
+
> [!NOTE]
40
+
> Wir benötigen grundsätzlich das `Hosting` Feature und die `DependencyInjection` Funktionalität in unserer Anwendung zu verwenden.
41
+
> Ich sage hier absichtlich "grundsätzlich", da ich bspw. in der hier enthaltenen `MvuxGallery` und `SimpleMemberSelectionApp` Anwendungen das `Hosting` Feature entfernt habe, die App erstellt habe und entgegen der offiziellen Dokumentation ich keine Probleme feststellen konnte.
42
+
> Alle DI Parameter wurden korrekt aufgelöst und ich war weiterhin im stande `ConfigureServices` für die Registrierung von bspw. `KeyedService` in der zugehörigen `App.xaml.cs` Datei mit dem [](https://www.nuget.org/packages/Uno.Sdk/6.3.28) zu verwenden.
## How To: Create a ViewModel or Model from Classes
6
6
7
-
In this guide, we will look at how to create a new class element in Visual Studio and then create either a ViewModel or a Model for use in an Uno Platform application with **MVUX**.
7
+
In this guide, we will look at how to create a new class element in Visual Studio and then create either a ViewModel or a Model for use in an Uno Platform application.
8
8
9
9
For the following steps, let's assume the page that the element to be created belongs to is called **SamplePage.xaml**
10
10
@@ -16,9 +16,10 @@ For the following steps, let's assume the page that the element to be created be
> In Mvux, Models are defined as `record` types to leverage immutability and value-based equality, which are beneficial for state management in applications.
42
+
> Using `partial` is essential in Mvux Models to enable code generation features provided by the framework, such as automatic property change notifications and other boilerplate code reductions.
43
+
> [!CAUTION]
44
+
> Just like in regular C# classes, Mvux Models or Services can also have primary constructors, which will by default produce the parameters as properties of the record type.
45
+
> A potential downside of this is, that a `INavigator` parameter in the primary constructor would also be a property of the Model, which is not what we normally want as part of our Model's public API.
46
+
> You should prefer defining those Service defining parameters in a secondary constructor and keep them as `private readonly` fields.
47
+
39
48
### [Create a ViewModel](#tab/create-mvvm-viewmodel)
40
49
41
50
To create a ViewModel suitable for Mvvm:
@@ -47,3 +56,6 @@ To create a ViewModel suitable for Mvvm:
> You are free to use the primary constructor in Uno ViewModels or Models, but note that using `Uno.Extensions.Navigation` you can not have parameters in the *page* constructor.
Copy file name to clipboardExpand all lines: docs/articles/en/Introduction-en.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,21 @@ Here is a quick overview of the included samples. You can find detailed informat
29
29
30
30
### XamlNavigationApp (Mvux)
31
31
32
-
-[NavigationView in MVUX or MVVM + XAML](xref:DevTKSS.Uno.ExtensionsNavigation.Overview.en)
32
+
-[NavigationView in MVUX or MVVM + XAML - Overview](xref:DevTKSS.Uno.ExtensionsNavigation.Overview.en) - [Watch Showcase Video on Youtube](https://youtu.be/vVvnK02r2ug)
33
+
-[Defining UI with a NavigationView](xref:DevTKSS.Uno.ExtensionsNavigation.HowTo-Defining-UI.en) - [Watch Tutorial on Youtube](https://youtu.be/knt2oOjHH30)
34
+
-[Responding to Route Changes](xref:DevTKSS.Uno.ExtensionsNavigation.HowTo-ChangeRoutes.en) - [Watch Tutorial on Youtube](https://youtu.be/RZ3RirA7jhk)
0 commit comments