|
| 1 | +--- |
| 2 | +uid: Mvux.XamlNavigationApp.HowTo-Navigation-mit-NavigationView-in-Mvux-und-Xaml |
| 3 | +--- |
| 4 | + |
| 5 | +# How To: Navigation mit einer `NavigationView` in einer XAML-Markup + MVUX Präsentation Uno Platform App |
| 6 | + |
| 7 | +Dieses Beispiel zeigt, wie man das `NavigationView`-Steuerelement verwendet, um zwischen Seiten in einer XAML-Markup- + MVUX-Präsentations-App zu navigieren. Die App ist so strukturiert, dass sie eine einfache Navigation ermöglicht und das MVUX-Muster demonstriert – mit Fokus auf Kürze und Einfachheit. |
| 8 | + |
| 9 | +**Das Beispiel enthält:** |
| 10 | + |
| 11 | +- Ein `NavigationView`-Steuerelement zur Navigation. |
| 12 | +- Routen, die in der Datei `App.xaml` definiert sind. |
| 13 | +- Eine `MainPage.xaml`, die als Einstiegspunkt für die Navigation dient. |
| 14 | +- `DashboardPage` und `SecondPage` als Beispielseiten für die Navigation. |
| 15 | +- Jede Seite bindet an einen `IState<string>`-Eigenschaft im zugehörigen Model, um die Zustandsverwaltung gemäß MVUX zu demonstrieren. |
| 16 | + |
| 17 | +Da diese Beispiel-App im Rahmen eines Community-Tutorial-Videos auf YouTube erstellt wurde, kannst du dem Video folgen und den Aufbau der App Schritt für Schritt nachvollziehen. |
| 18 | + |
| 19 | +🔗 [Zur Playlist auf YouTube](https://youtube.com/playlist?list=PLEL6kb4Bivm_g81iKBl-f0eYPNr5h2dFX&si=qHkpAUMSW9s8GZCO) |
| 20 | + |
| 21 | +Showcase-Video: [!Video [Navigation in Xaml und Mvux mit Navigation View (Showcase)](https://youtu.be/vVvnK02r2ug)] |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## 🧰 Voraussetzungen |
| 26 | + |
| 27 | +- Visual Studio 2022 oder neuer mit installierter Uno Platform-Erweiterung |
| 28 | +- Der Befehl `uno-check --tfm net9.0-desktop` im Terminal muss alle relevanten Prüfungen bestehen |
| 29 | + |
| 30 | +- 📚 Weitere Informationen: [Uno Platform Dokumentation](https://platform.uno/docs/articles/external/uno.check/doc/using-uno-check.html) |
| 31 | + |
| 32 | +### 📺 Videoanleitung |
| 33 | + |
| 34 | +[!Video [How To: Einrichten unserer Uno Platform Entwicklungsumgebung](https://youtu.be/oI6IZVOeQBI)]] |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## [⚙️ App-Konfiguration mit dem Visual Studio-Wizard](#tab/vs-wizard) |
| 39 | + |
| 40 | +1. Erstelle eine neue Uno Platform App: |
| 41 | + |
| 42 | + 1. Wähle die Vorlage **`recommended`** |
| 43 | + 1. Ziel-Framework: **`net9.0`** |
| 44 | + 1. Markup: **`Xaml`** |
| 45 | + 1. Präsentation: **`MVUX`** |
| 46 | + 1. Erweiterungen: **`Regions`**, **`Dependency Injection`** |
| 47 | + 1. *Optional: `Toolkit`, `Localization`, `Configuration`* |
| 48 | + |
| 49 | +2. Klicke auf **`Create`**, um die App zu generieren. |
| 50 | + |
| 51 | +### 📺 Video Tutorial zur Konfiguration |
| 52 | + |
| 53 | +[!Video [How To: Konfigurieren unserer Uno App Visual Studio Wizard](https://youtu.be/UGKidrvdKpQ)] |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +## [🖥️ App-Konfiguration über die CLI](#tab/cli) |
| 58 | + |
| 59 | +1. Öffne ein Terminal und navigiere in das gewünschte Verzeichnis. |
| 60 | +2. Führe folgenden Befehl aus, um eine neue App zu erstellen: |
| 61 | + |
| 62 | + ```bash |
| 63 | + dotnet new unoapp -o UnoApp2 -preset "recommended" -platforms "desktop" -config False -http "none" -loc False -dsp False -theme-service False |
| 64 | + ``` |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +## 📺 Tutorial Video: Navigation mit `NavigationView` in MVUX und XAML |
| 69 | + |
| 70 | +Jetzt kann es auch schon loslegen mit der Navigation in deiner App! In diesem Video zeige ich dir, wie du das `NavigationView`-Steuerelement in einer XAML-Markup + MVUX-App einrichtest und verwendest. Wir werden die Navigation zwischen verschiedenen Seiten implementieren und dabei die MVUX-Prinzipien anwenden. |
| 71 | + |
| 72 | +[!Video [Navigation in Xaml und Mvux mit Navigation View](https://youtu.be/knt2oOjHH30)] |
| 73 | + |
| 74 | +[Hier geht's zum Source Code](../../../src/DevTKSS.Uno.XamlNavigationApp-1/) |
| 75 | + |
| 76 | +## Weitere interessante Informationen |
| 77 | + |
| 78 | +### Uno Documentation links |
| 79 | + |
| 80 | +- [How-To: Navigate in Xaml](https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/Navigation/HowTo-NavigateInXAML.html) |
| 81 | +- [How-To: Define Routes](https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/Navigation/HowTo-DefineRoutes.html) |
| 82 | +- [How-To: Regions](https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/Navigation/HowTo-Regions.html) |
| 83 | +- [How-To: Use NavigationView to Switch Views](https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/Navigation/Advanced/HowTo-UseNavigationView.html) |
| 84 | +- [How-To: IRouteNotifier](https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/Navigation/Advanced/HowTo-IRouteNotifier.html) (*möglicherweise fehlerhaft aktuell*) |
0 commit comments