From dbf0a1f3c65c6b4b5e06961b20f6ee22448dc13b Mon Sep 17 00:00:00 2001 From: Riccardo Piredda <127589992+Nemonek@users.noreply.github.com> Date: Sun, 1 Sep 2024 13:23:48 +0200 Subject: [PATCH 01/17] Starting to create guide --- ...o-show-and-hide-a-split-view-pane-with-mvvm.md | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md b/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md index 5f77c5bd8..2eafddd8d 100644 --- a/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md +++ b/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md @@ -2,18 +2,5 @@ id: how-to-show-and-hide-a-split-view-pane-with-mvvm title: How To Show and Hide a Split View Pane with MVVM --- - -import SplitViewExpanderScreenshot from '/img/reference/controls/splitview/splitview-expander.gif'; - -Content in preparation. - -You can use the MVVM pattern with the split view control to implement a 'tool pane' style UI. - -:::info -This technique uses a complex **binding path** to locate the parent view model for the -::: - -TO DO - - +# How To Show and Hide a Split View Pane with MVVM From e52c0836149b197dda937328b2c2a6c07f6f1940 Mon Sep 17 00:00:00 2001 From: Riccardo Piredda <127589992+Nemonek@users.noreply.github.com> Date: Sun, 1 Sep 2024 14:26:24 +0200 Subject: [PATCH 02/17] Create img folder for guide How-to-show-and-hide-a-split-view-pane-with-MVVM --- .../How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md diff --git a/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md b/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md @@ -0,0 +1 @@ + From a74a02e482e130dd4e25e593c1e1d841d6a08497 Mon Sep 17 00:00:00 2001 From: Riccardo Piredda <127589992+Nemonek@users.noreply.github.com> Date: Sun, 1 Sep 2024 14:27:16 +0200 Subject: [PATCH 03/17] Delete tpm file used to create directories --- .../How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md diff --git a/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md b/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md deleted file mode 100644 index 8b1378917..000000000 --- a/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md +++ /dev/null @@ -1 +0,0 @@ - From de13a4317795e629ac6b00ac114e6360ed710af7 Mon Sep 17 00:00:00 2001 From: Riccardo Piredda <127589992+Nemonek@users.noreply.github.com> Date: Sun, 1 Sep 2024 14:33:28 +0200 Subject: [PATCH 04/17] Create directories ( again ) for images I guess github does not like empty directories --- .../How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md diff --git a/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md b/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md @@ -0,0 +1 @@ + From d029d110f709ee52147c607f64ba18474b5bc22e Mon Sep 17 00:00:00 2001 From: Riccardo Piredda <127589992+Nemonek@users.noreply.github.com> Date: Sun, 1 Sep 2024 14:33:59 +0200 Subject: [PATCH 05/17] Upload example images --- .../First-example.PNG | Bin 0 -> 12144 bytes .../Second-example.PNG | Bin 0 -> 17482 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/First-example.PNG create mode 100644 static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/Second-example.PNG diff --git a/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/First-example.PNG b/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/First-example.PNG new file mode 100644 index 0000000000000000000000000000000000000000..ddadb5719089e6170724ab38c57101ab2ad5cdc0 GIT binary patch literal 12144 zcmeHN2~<ypQbmS@L`4XSBvq7DhU7tj7^a&6NJ5f(UlQ^!?{odU=j+n0{{JFtv2L<+vd`K3 zeEZw`?8C`*YgdjNGj$9Cff%>yt7RJyh~cRSguQIk2(#prk1N;wup@3*xfGEnoUSl` z7#8})nlBKD{1gY{?&0Roqa(iBN<<(g9<}`0N%o^+5D1UqtCoGSF($aH5lGp`po&%1 zsJoMp@%HFj%qI_$JU@%{T;=Zn^`1Q^j=%picG=Gp?H{_Hn42{D?5J-(ah`Z>Vf~Mf z66`l^n9xIfU0FXZ`^b)2<9|Ik=7;mM?tOhFYs0e`67?dnP1u= zv?-*I!%pjojNad!LhN=4Qg1H|^*9tB?ikG@>D8?|lm2vJtd=9C29X75$$~?N4q+n5 z-No`|ZS`Zzs}rnSiB&r@7${myOx1RYx}@95)P(aq#0w$Bw2;C3N}&^FuTJI!ooq@8 zKjcIxjX4nW@<&D%#G@Hi0*02SEiJ2;f_+UpfjF`9<<%5N6sTmR@cA4Ln)32X)MXwd zB=LxU)YqpkLPA2JPzh@J^q9_kK^7E@>nE62B4b;09ajOWG66Lmt32kkTDwZn9~X|P zRV~CVVU`~z5CqZrMW?$O4=6$-)9xfDqscW;1&dKSL8KB$K;7-0TSde;B(sdnI~3?= z*+4{mti7k@i8vcS*7ETC)b%~fbNuK^%LB12(2u65IQ=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s2t#T?*Cf#7*5+Z>qHaf zvGD6A$^BJBcb+!py3-po!J%qQnI0hei$wrHsqu|Zspih(+pq=i-UPr|GTx4yk)gz0 zVfPDxH3>7NiUca%A=-$AQ=563*1vd&pQ3(B5h>`htPOG7t*z=Xln~I{7$up-K^Tn$ znniMC1x}yi!`1lY81_t!ZU$2j^R{+d=43PB7BeuL`@tuX{$!wB_N*v#k~7F#U7YTD zzx5-se;}JK|3e)3#KGXtn9Y;B!8_^n+TeejfvgGDzTxDz@Bw$XpqY7s=Rew3E7m;_ zTMuro2ZwH5cfPOPg4zB^s<&gQAa zf9zP~FM0kYPm!JfrBDCEF!Pt){AD+P+09>m7E%H;TXuBX>)AVC zzkm?;*4h@oO9&E$C;C?vCWdxycOqBQh5Br~L# zaiz|1xhY9N2|LDJQ5R>f7=}E&9I~A3#O^JS5%L;>#)oAyJp>45VK`a>D^NrFta;vb z-Mhq!=k(-;;4YdI9PHR_fhQd*!S~mt%G8na_r=7CkHPDrpPQfWTo%e=bRA9yIp0Du cj|ow4sr(*&5ALarg!1a;8<&bM-23hS09Br6IRF3v literal 0 HcmV?d00001 From b434a66f298122180afd02c902e28ede25c430e8 Mon Sep 17 00:00:00 2001 From: Riccardo Piredda <127589992+Nemonek@users.noreply.github.com> Date: Sun, 1 Sep 2024 14:39:40 +0200 Subject: [PATCH 06/17] First version of the guide. Waiting for last part --- ...ow-and-hide-a-split-view-pane-with-mvvm.md | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md b/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md index 2eafddd8d..45761161b 100644 --- a/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md +++ b/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md @@ -2,5 +2,155 @@ id: how-to-show-and-hide-a-split-view-pane-with-mvvm title: How To Show and Hide a Split View Pane with MVVM --- + +import FirstExample from '/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/First-example.PNG'; +import SecondExample from '/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/Second-example.PNG'; + # How To Show and Hide a Split View Pane with MVVM +In this guide you will learn how to show and hide a split view panel using the MVVM pattern. If you are new to Avalonia UI please check out the following documents: [The MVVM patter](https://docs.avaloniaui.net/docs/concepts/the-mvvm-pattern/) - [Avalonia UI and MVVM](https://docs.avaloniaui.net/docs/concepts/the-mvvm-pattern/avalonia-ui-and-mvvm). +To proceed in this guide you will need at least a basic understanding of what Data Binding is and how it works in Avalonia. +If you are coming from WPF, then the mechanism is nearly the same, except for some differences that will not be covered in this guide. + +## Starting +First of all, you need to create an MVVM application project, which you can do by reading the following guide [Create and run a project](https://docs.avaloniaui.net/docs/get-started/test-drive/create-a-project).
+Once you created the project you should be presented with the following files: +- MainWindow.axaml +- MainWindowViewModel.cs + +Those are the files that you will be editing, except for the one that you will be creating during this guide. + +:::info +Although here I will be using the MainWindow.axaml and MainWindowViewModel.cs files, this guide will work for every other View and its respective ViewModel. +::: + +## Adding the SplitView panel to the MainWindow +The starting point will be something like this: +``` xml +add +``` + +For the sake of simplicity I will be deleting everything in the main window and adding the SplitView panel. +
+Start by creating the panel and by defining the basics of how you want it to behave (for more informations on how this control works see [here](https://docs.avaloniaui.net/docs/reference/controls/splitview)) +``` xml + + +``` +If you used this same code you should see the following window when starting the application. The light grey panel on the right is the one you will be expanding at the end of this guide. +First example + +## Adding the SplitView's pane +Now that we have the SplitView we need to create its pane, which is the part that will be hidden when the split view is closed. +``` xml + + + + + +``` +We will now add some additional elements to the pane. First we will add a StackPanel, then a button and a textbox with the text "Settings". The following configurations will ensure that the button and the text are aligned. +``` xml + + + + + + + + +``` + +### Adding some content to the SplitView +To make things more clear, I will add a TextBlock in the main part of the SplitView, which will be the content you may add and that will be alway visible. +``` xml + + + + + + + + + +``` + +## Binding the SplitView's `IsPaneOpen` property to a ViewModel's property. +Fist of all, create a boolean property with a private backing field in the ViewModel which will contains the boolean value. Now, by using Reactive UI, make it notify every change to the backing field to the UI. Remember to initialize the backing property with the value you need in the VewModel's constructor. +:::info +By default in an MVVM project each ViewModel inherit from a ViewModelBase which inherits from the ReactiveObject class. By doing so in every ViewModel there will be the necessary methods to notify the UI. For more informations see [here](https://docs.avaloniaui.net/docs/concepts/reactiveui/reactive-view-model). +::: +``` C# +private bool _isSplitViewPaneOpen; +public bool IsSplitViewPaneOpen +{ + get => this._isSplitViewPaneOpen; + set + { + this.RaiseAndSetIfChanged(ref this._isSplitViewPaneOpen, value); + } +} +public MainWindowViewModel() +{ + this._isSplitViewPaneOpen = false; +} +``` +Now that we have the property with its backing field initialized, we can bind it to the SplitView's property: add the following code to the SplitView tag. +``` xml +IsPaneOpen="{Binding IsSplitViewPaneOpen}" +``` +You should now have the following configuration: +``` xml + +``` + +## Configuring the button +At this point all we need to do is make the button open and close the SplitView's pane when clicked. +To do so create a public property of type ICommand in the ViewModel with just the "getter method". +``` C# +public ICommand ChangeSplitViewPaneStatusCommand { get; } +``` +And initialize it in the constructor. +``` C# +this.ChangeSplitViewPaneStatusCommand = ReactiveCommand.Create(() => +{ + this.IsSplitViewPaneOpen = !this.IsSplitViewPaneOpen; +}); +``` +
+You should now have the following code in the ViewModel: + +``` C# +public class MainWindowViewModel : ViewModelBase +{ + private bool _isSplitViewPaneOpen; + public bool IsSplitViewPaneOpen + { + get => this._isSplitViewPaneOpen; + set + { + this.RaiseAndSetIfChanged(ref this._isSplitViewPaneOpen, value); + } + } + + public ICommand ChangeSplitViewPaneStatusCommand { get; } + public MainWindowViewModel() + { + this._isSplitViewPaneOpen = false; + this.ChangeSplitViewPaneStatusCommand = ReactiveCommand.Create(() => + { + this.IsSplitViewPaneOpen = !this.IsSplitViewPaneOpen; + }); + } +} +``` +Now, to make the button invoke the command you just need to bind it. (For more informations see [here](https://docs.avaloniaui.net/docs/0.10.x/data-binding/binding-to-commands)) +``` xml + +``` +
+The final MainWindow code should look like this: + +``` xml + + + + + + + + + + + + + + + + + + + + + +``` + +:::warning +If you want to approach the problem by using just a normal converter and passing to it, as parameter, the IsSplitViewPaneOpen property, don't try to do that as ConverterParameter does not currently support binding. +::: From 5b4fd82060a2703c01187a8df7879641df74f143 Mon Sep 17 00:00:00 2001 From: Riccardo Piredda <127589992+Nemonek@users.noreply.github.com> Date: Sun, 1 Sep 2024 15:06:19 +0200 Subject: [PATCH 08/17] Added initial code. Waiting to review for grammar errors before creating a pull request. --- ...ow-and-hide-a-split-view-pane-with-mvvm.md | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md b/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md index 440220f1d..46b9e18be 100644 --- a/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md +++ b/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md @@ -26,10 +26,29 @@ Although here I will be using the MainWindow.axaml and MainWindowViewModel.cs fi ## Adding the SplitView panel to the MainWindow The starting point will be something like this: ``` xml -add + + + + + + + + + + ``` -For the sake of simplicity I will be deleting everything in the main window and adding the SplitView panel. +For the sake of simplicity I will be deleting the default TextBlock and its value in the MainWindowViewModel.
Start by creating the panel and by defining the basics of how you want it to behave (for more informations on how this control works see [here](https://docs.avaloniaui.net/docs/reference/controls/splitview)) ``` xml From 60693617dd036df0533f1c219f763b22cd56ce9b Mon Sep 17 00:00:00 2001 From: Riccardo Piredda <127589992+Nemonek@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:26:35 +0200 Subject: [PATCH 09/17] Grammar & final images --- ...ow-and-hide-a-split-view-pane-with-mvvm.md | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md b/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md index 46b9e18be..daaee08b7 100644 --- a/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md +++ b/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md @@ -5,6 +5,8 @@ title: How To Show and Hide a Split View Pane with MVVM import FirstExample from '/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/First-example.PNG'; import SecondExample from '/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/Second-example.PNG'; +import PaneHidden from '/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/Pane-Hidden.PNG'; +import PaneShown from '/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/Pane-shown.PNG'; # How To Show and Hide a Split View Pane with MVVM In this guide you will learn how to show and hide a split view panel using the MVVM pattern. If you are new to Avalonia UI please check out the following documents: [The MVVM patter](https://docs.avaloniaui.net/docs/concepts/the-mvvm-pattern/) - [Avalonia UI and MVVM](https://docs.avaloniaui.net/docs/concepts/the-mvvm-pattern/avalonia-ui-and-mvvm). @@ -48,9 +50,9 @@ The starting point will be something like this: ``` -For the sake of simplicity I will be deleting the default TextBlock and its value in the MainWindowViewModel. +For the sake of simplicity we will be deleting the default TextBlock and its value in the MainWindowViewModel.
-Start by creating the panel and by defining the basics of how you want it to behave (for more informations on how this control works see [here](https://docs.avaloniaui.net/docs/reference/controls/splitview)) +Now, create the panel and define the basics of how you want it to behave (for more informations on how this control works see [here](https://docs.avaloniaui.net/docs/reference/controls/splitview)) ``` xml @@ -67,7 +69,7 @@ Now that we have the SplitView we need to create its pane, which is the part tha
``` -We will now add some additional elements to the pane. First we will add a StackPanel, then a button and a textbox with the text "Settings". The following configurations will ensure that the button and the text are aligned. +We will now add some additional elements to the pane. First a StackPanel, then a button and a textbox with the text "Settings". The following configurations will ensure that the button and the text are aligned. ``` xml @@ -81,7 +83,7 @@ We will now add some additional elements to the pane. First we will add a StackP ``` ### Adding some content to the SplitView -To make things more clear, I will add a TextBlock in the main part of the SplitView, which will be the content you may add and that will be alway visible. +To make things more clear, I will add a TextBlock in the main part of the SplitView, which will be the content you may add and that will be always visible. ``` xml @@ -96,7 +98,7 @@ To make things more clear, I will add a TextBlock in the main part of the SplitV ``` ## Binding the SplitView's `IsPaneOpen` property to a ViewModel's property. -Fist of all, create a boolean property with a private backing field in the ViewModel which will contains the boolean value. Now, by using Reactive UI, make it notify every change to the backing field to the UI. Remember to initialize the backing property with the value you need in the VewModel's constructor. +Fist of all, create a boolean property with a private backing field in the ViewModel which will contains the boolean value. Now, by using Reactive UI, make it notify every change to the field to the UI. Remember to initialize the backing property with the value you need in the VewModel's constructor. :::info By default in an MVVM project each ViewModel inherit from a ViewModelBase which inherits from the ReactiveObject class. By doing so in every ViewModel there will be the necessary methods to notify the UI. For more informations see [here](https://docs.avaloniaui.net/docs/concepts/reactiveui/reactive-view-model). ::: @@ -137,6 +139,7 @@ this.ChangeSplitViewPaneStatusCommand = ReactiveCommand.Create(() => this.IsSplitViewPaneOpen = !this.IsSplitViewPaneOpen; }); ``` +In this example I will be using a very simple logic: if the value is true it becomes false, and if it's false it becomes true.
You should now have the following code in the ViewModel: @@ -175,9 +178,9 @@ By doing so the command will be invoked each time the button is clicked and will Second example ## Adding content to the button -Finally, you now just need to add some content to the button that indicates whether you need to show or hide the SplitView's pane. In this guide I will be using the following characters: -- '<' to indicate the pane will be shown. -- '>' to indicate the pane will be hidden. +Finally, you now just need to add some content to the button that indicates whether you need to show or hide the SplitView's pane. In this guide we will be using the following characters: +- '<' to indicate the pane will be shown on click. +- '>' to indicate the pane will be hidden on click. ### Implement a converter To do this step we will need the char to change as the Pane goes from shown to hidden and viceversa. To do so we need to create a converter function that will return the necessary char to the button when clicked.
@@ -216,7 +219,7 @@ Lastly, all that remains to do is bind the converter to the button's content. To ``` xml xmlns:convs="clr-namespace:how_to_show_and_hide_a_split_view_pane_with_mvvm.Models" ``` -So that the Window tag will look something like +So that the Window tag will look something like this. ``` xml ``` - :::warning If you want to approach the problem by using just a normal converter and passing to it, as parameter, the IsSplitViewPaneOpen property, don't try to do that as ConverterParameter does not currently support binding. ::: +## Final result: +**Pane hidden** +Pane hidden +**Pane shown** +Pane shown From 99f39c6ce53ce853bcf8de015c87d4a3325b19b3 Mon Sep 17 00:00:00 2001 From: Riccardo Piredda <127589992+Nemonek@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:28:19 +0200 Subject: [PATCH 10/17] Delete tmp file used for directory creation. --- .../How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md diff --git a/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md b/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md deleted file mode 100644 index 8b1378917..000000000 --- a/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/tmp.md +++ /dev/null @@ -1 +0,0 @@ - From 1df45371dbe5df4898ccc496fd345d56d8928f85 Mon Sep 17 00:00:00 2001 From: Riccardo Piredda <127589992+Nemonek@users.noreply.github.com> Date: Mon, 2 Sep 2024 13:30:22 +0200 Subject: [PATCH 11/17] Upload final images --- .../Pane-Hidden.PNG | Bin 0 -> 14656 bytes .../Pane-Shown.PNG | Bin 0 -> 17627 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/Pane-Hidden.PNG create mode 100644 static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/Pane-Shown.PNG diff --git a/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/Pane-Hidden.PNG b/static/img/guides/development-guides/How-to-show-and-hide-a-split-view-pane-with-MVVM/Pane-Hidden.PNG new file mode 100644 index 0000000000000000000000000000000000000000..0c7be0cb1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$?xDF>Z~}*Suf!DS5Lj(rj6dp>TTNSe`wn1EjZtT^DQ{vg7g2E{d{OI zzLv1H9>qsoQfRp~cT8I@vEE4j{*gNdh--VcrlYZmE)@c*U~pRHv?<)ER8H;SETFlxfqY`<~v zx}er?Ijk2QkvGJsxIyvn7v}tHlH0lvE7>6Wg@2miKjo#6;vaNwoN@d&inQsHl>Wx~ z1#LM>_=eK_rhvaou5#m^&A)%w<*(n4QS@M&ka2BW0kl;gj8RV&VqCu?^Z#OnW4fDG zw&G+cuPOn#wJ?miQC9XlFqs=QW&gQbLjNhry-@*119R-(0LoUK1Anl7LGyPy|GK9C zn?1 Date: Mon, 2 Sep 2024 14:13:28 +0200 Subject: [PATCH 12/17] More grammar --- ...w-to-show-and-hide-a-split-view-pane-with-mvvm.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md b/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md index daaee08b7..58a8332bc 100644 --- a/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md +++ b/docs/guides/development-guides/how-to-show-and-hide-a-split-view-pane-with-mvvm.md @@ -83,7 +83,7 @@ We will now add some additional elements to the pane. First a StackPanel, then a ``` ### Adding some content to the SplitView -To make things more clear, I will add a TextBlock in the main part of the SplitView, which will be the content you may add and that will be always visible. +To make things more clear, I will add a TextBlock in the main part of the SplitView, which will be the content you may add and that will always be visible. ``` xml @@ -100,7 +100,7 @@ To make things more clear, I will add a TextBlock in the main part of the SplitV ## Binding the SplitView's `IsPaneOpen` property to a ViewModel's property. Fist of all, create a boolean property with a private backing field in the ViewModel which will contains the boolean value. Now, by using Reactive UI, make it notify every change to the field to the UI. Remember to initialize the backing property with the value you need in the VewModel's constructor. :::info -By default in an MVVM project each ViewModel inherit from a ViewModelBase which inherits from the ReactiveObject class. By doing so in every ViewModel there will be the necessary methods to notify the UI. For more informations see [here](https://docs.avaloniaui.net/docs/concepts/reactiveui/reactive-view-model). +By default in an MVVM project each ViewModel inherits from a ViewModelBase which inherits from the ReactiveObject class. By doing so in every ViewModel there will be the necessary methods to notify the UI. For more informations see [here](https://docs.avaloniaui.net/docs/concepts/reactiveui/reactive-view-model). ::: ``` C# private bool _isSplitViewPaneOpen; @@ -212,10 +212,10 @@ public object? Convert(IList values, Type targetType, object? parameter } ``` :::warning -Since we need only one value in this code we assume that every single value passed to this function should be a boolean. +Since we need only one value in this code we will assume that every single value passed to this function should be a boolean. ::: ### Bind the converter to the button content. -Lastly, all that remains to do is bind the converter to the button's content. To do so import the namespace of the converter in the MainWindow.axaml file by adding the following line +Lastly, all that's left to do is bind the converter to the button's content. To do so import the namespace of the converter in the MainWindow.axaml file by adding the following line ``` xml xmlns:convs="clr-namespace:how_to_show_and_hide_a_split_view_pane_with_mvvm.Models" ``` @@ -241,7 +241,7 @@ Now add the converter to the static resources of the Window by doing the followi ``` -Bind the button's content to the converter and pass as parameter to the converter the IsSplitViewPaneOpen property. +Bind the button's content to the converter and pass the IsSplitViewPaneOpen property as a parameter to the converter. ``` xml