Skip to content

Commit 6c99479

Browse files
lukeblevinsmrlaceyagneszitte
authored
docs: Apply suggestions from review
Co-authored-by: Matt Lacey <[email protected]> Co-authored-by: Agnès ZITTE <[email protected]>
1 parent 08472b6 commit 6c99479

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

hub/apps/get-started/uno-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ ms.localizationpriority: medium
1313

1414
1. Open a command-line prompt, Windows Terminal if you have it installed, or else Command Prompt or Windows Powershell from the Start Menu.
1515

16-
2. Install the `uno-check` tool:
16+
2. Install or update the `uno-check` tool:
1717
- Use the following command:
1818

1919
`dotnet tool install -g uno.check`
2020

21-
- To update the tool, if you already have an existing one:
21+
- To update the tool, if you already have previously installed an older version:
2222

2323
`dotnet tool update -g uno.check`
2424

hub/apps/get-started/uno-simple-photo-viewer.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,16 @@ Return to the **SimplePhotos** project from the previous tutorial. In the **Solu
163163
</Window>
164164
```
165165

166-
Uno Platform's multi-platform implmentation of the controls found in the `Window` element, such as `GridView`, `Image`, and `RatingControl`, ensure that the view itself will work on all supported platforms with only a trivial amount of effort. Copy the contents of this `Window` and paste them into the `Page` element of the `MainPage.xaml` file in the **UnoSimplePhotos** Uno Platform project. The `MainPage` view XAML should look like this:
166+
Uno Platform's multi-platform implementation of the controls found in the `Window` element, such as `GridView`, `Image`, and `RatingControl`, ensure that the view itself will work on all supported platforms with only a trivial amount of effort. Copy the contents of this `Window` and paste them into the `Page` element of the `MainPage.xaml` file in the **UnoSimplePhotos** Uno Platform project. The `MainPage` view XAML should look like this:
167167

168168
```xml
169-
<Page
170-
x:Class="UnoSimplePhotos.MainPage"
171-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
172-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
173-
xmlns:local="using:UnoSimplePhotos"
174-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
175-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
176-
mc:Ignorable="d">
169+
<Page x:Class="UnoSimplePhotos.MainPage"
170+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
171+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
172+
xmlns:local="using:UnoSimplePhotos"
173+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
174+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
175+
mc:Ignorable="d">
177176

178177
<Grid>
179178
<Grid.Resources>
@@ -240,11 +239,11 @@ Uno Platform's multi-platform implmentation of the controls found in the `Window
240239

241240
Recall that the desktop solution also had a `MainWindow.xaml.cs` file that contained code-behind which corresponds to the view. In the Uno Platform project, the code-behind for the `MainPage` view we've copied into is contained in the `MainPage.xaml.cs` file.
242241

243-
To bring this codebehind multiplatform, we should first move the following into the `MainPage.xaml.cs` file:
242+
To bring this code-behind multi-platform, we should first move the following into the `MainPage.xaml.cs` file:
244243

245244
- `Images` property: Provides the `GridView` with an observable collection of image files
246245

247-
- Contents of constructor: Calls `GetItemsAsync()` to populate the `Images` collection with items representing image files
246+
- Contents of the constructor: Calls `GetItemsAsync()` to populate the `Images` collection with items representing image files
248247

249248
- Remove the manual modification of the `ImageGridView` control's `ItemsSource` property
250249

@@ -254,7 +253,7 @@ To bring this codebehind multiplatform, we should first move the following into
254253

255254
- `GetItemsAsync` method: Gets the image asset files from the `Samples` folder
256255

257-
- `LoadImageInfoAsync` method: Constructs a `ImageFileInfo` object from a created `StorageFile`
256+
- `LoadImageInfoAsync` method: Constructs an `ImageFileInfo` object from a created `StorageFile`
258257

259258
After moving everything over, `MainPage.xaml.cs` should now look like this:
260259

@@ -573,7 +572,7 @@ private async void ShowImage(ListViewBase sender, ContainerContentChangingEventA
573572
}
574573
```
575574

576-
Again, preprocessor directives ensure that the `ContainerContentChangingEventArgs.Phase` property is only used where it is supported. We make use of the previously unused `GetImageSourceAsync()` method to load the image files into the `GridView` on platforms other than Windows. At this point, we will accommodate the changes made above by editing to the `ImageFileInfo` class.
575+
Again, preprocessor directives ensure that the `ContainerContentChangingEventArgs.Phase` property is only used where it is supported. We make use of the previously unused `GetImageSourceAsync()` method to load the image files into the `GridView` on platforms other than Windows. At this point, we will accommodate the changes made above by editing the `ImageFileInfo` class.
577576

578577
### Creating a separate code path for other platforms
579578

@@ -583,7 +582,7 @@ Update `ImageFileInfo.cs` to include a new property called `ImageSource` that wi
583582
public BitmapImage? ImageSource { get; private set; }
584583
```
585584

586-
Because platforms like the Web do not support advanced image file properties that are readily available on Windows, we should add a constructor overload which does not require an `ImageProperties` typed parameter. Add a new overload under the existing one using the following code:
585+
Because platforms like the Web do not support advanced image file properties that are readily available on Windows, we should add a constructor overload that does not require an `ImageProperties` typed parameter. Add a new overload under the existing one using the following code:
587586

588587
```csharp
589588
public ImageFileInfo(StorageFile imageFile,
@@ -620,7 +619,7 @@ public async Task<BitmapImage> GetImageSourceAsync()
620619
}
621620
```
622621

623-
To prevent getting the value of `ImageProperties` when its null, we will need to make the following changes:
622+
To prevent getting the value of `ImageProperties` when it's null, we will need to make the following changes:
624623

625624
- Modify the `ImageDimensions` property to use the null conditional operator:
626625

@@ -852,7 +851,7 @@ The `MainPage.xaml` file should now look like this:
852851
Stretch="Uniform" />
853852

854853
<StackPanel Orientation="Vertical"
855-
Grid.Row="1">
854+
Grid.Row="1">
856855
<TextBlock Text="{x:Bind ImageTitle}"
857856
HorizontalAlignment="Center"
858857
Style="{StaticResource SubtitleTextBlockStyle}" />
@@ -908,16 +907,16 @@ You can now build and run your app on any of the supported platforms. To do so,
908907
- Press the `UnoSimplePhotos.Wasm` button to deploy the app
909908
- If desired, you can add and use the `UnoSimplePhotos.Server` project as an alternative
910909
* To debug for **iOS**:
911-
- Right-click on the `UnoSimplePhotos.Mobile` project, select **Set as startup project**
910+
- Right-click on the `UnoSimplePhotos.Mobile` project, and select **Set as startup project**
912911
- In the debug toolbar drop-down, select an active iOS device or the simulator. You'll need to be paired with a Mac for this to work.
913912

914913
:::image type="content" source="../images/uno/uno-mobile-debug.png" alt-text="Visual Studio dropdown to select a target framework to deploy":::
915914

916915
* To debug for **Mac Catalyst**:
917-
- Right-click on the `UnoSimplePhotos.Mobile` project, select **Set as startup project**
916+
- Right-click on the `UnoSimplePhotos.Mobile` project, and select **Set as startup project**
918917
- In the debug toolbar drop-down, select a remote macOS device. You'll need to be paired with one for this to work.
919918
* To debug the **Android** platform:
920-
- Right-click on the `UnoSimplePhotos.Mobile` project, select **Set as startup project**
919+
- Right-click on the `UnoSimplePhotos.Mobile` project, and select **Set as startup project**
921920
- In the debug toolbar drop-down, select either an active Android device or the emulator
922921
- Select an active device in the "Device" sub-menu
923922
* To debug on **Linux** with **Skia GTK**:

0 commit comments

Comments
 (0)