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
Fix C++/WinRT PropertyChanged code in WinUI 3 photo viewer tutorial
- Remove redundant winrt:: qualifiers inside winrt:: namespaces
- Move PropertyChanged add/remove from inline header to .cpp (aligns
with official C++/WinRT binding docs pattern)
- Rename OnPropertyChanged -> RaisePropertyChanged (matches official
Photo Editor sample naming)
- Add using namespace Microsoft::UI::Xaml::Data in .cpp to support
unqualified PropertyChangedEventArgs usage
- Add TIP linking to full working Photo Editor sample (Photo.h)
- Update VS project template name to 'WinUI Blank App (Packaged)'
- Update ms.date to 03/24/2026
Fixes: #5454
ADO: https://dev.azure.com/msft-skilling/Content/_workitems/edit/564056
Co-authored-by: Copilot <[email protected]>
Copy file name to clipboardExpand all lines: hub/apps/get-started/simple-photo-viewer-winui3.md
+32-23Lines changed: 32 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Tutorial--Create a simple photo viewer with WinUI
3
3
description: In this topic we walk through the process of building a simple WinUI app to display photos. We'll use controls, layout panels, and data-binding. And we'll be writing both XAML markup (which is *declarative*) and C# code (which is *imperative*, or *procedural*).
4
4
ms.topic: tutorial
5
-
ms.date: 08/19/2024
5
+
ms.date: 03/24/2026
6
6
keywords: Windows, App, SDK, WinUI, WinUI, photo, viewer, Windows 11, Windows 10, XAML, C#, C++
7
7
ms.localizationpriority: medium
8
8
---
@@ -26,7 +26,7 @@ To set up your development computer, see [Get started with WinUI](../get-started
26
26
27
27
## Step 2: Create a new project
28
28
29
-
In Visual Studio, create your choice of a new C# or C++ project from the **Blank App, Packaged (WinUI in Desktop)** project template. Name the project *SimplePhotos*, and (so that your folder structure will match the one described in this tutorial) uncheck **Place solution and project in the same directory**. You can target the most recent release (not preview) of the client operating system.
29
+
In Visual Studio, create your choice of a new C# or C++ project from the **WinUI Blank App (Packaged)** project template. Name the project *SimplePhotos*, and (so that your folder structure will match the one described in this tutorial) uncheck **Place solution and project in the same directory**. You can target the most recent release (not preview) of the client operating system.
30
30
31
31
## Step 3: Copy asset files
32
32
@@ -238,6 +238,9 @@ A *model* (in the sense of models, views, and view models) is a class that to so
238
238
239
239
1. Replace the contents of `ImageFileInfo.h` with the code listing below.
240
240
241
+
> [!TIP]
242
+
> For a complete, buildable reference implementation of this class, see [Photo.h](https://github.com/microsoft/WindowsAppSDK-Samples/blob/main/Samples/PhotoEditor/cpp-winui/PhotoEditor/Photo.h) in the Windows App SDK Photo Editor C++ sample.
243
+
241
244
```cppwinrt
242
245
// ImageFileInfo.h
243
246
#pragma once
@@ -250,17 +253,17 @@ A *model* (in the sense of models, views, and view models) is a class that to so
0 commit comments