Skip to content

Commit 2274cb4

Browse files
committed
Windows 11 Version 23H2 - July 2025 Samples Update
1 parent 534d40a commit 2274cb4

File tree

7 files changed

+27
-63
lines changed

7 files changed

+27
-63
lines changed

Samples/BasicHologram/cs/BasicHologram.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
<Import Project="ms.fxcompile.targets" />
130130
<ItemGroup>
131131
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
132-
<Version>5.2.2</Version>
132+
<Version>5.2.4</Version>
133133
</PackageReference>
134134
<PackageReference Include="SharpDX">
135135
<Version>3.0.2</Version>

Samples/DWriteLineSpacingModes/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Within the DWriteTextLayoutImplementation project, the following files are signi
5151
* The TextLayout.h/.cpp files wrap the DirectWrite text layout and related line spacing APIs.
5252
* The TextLayoutImageSource.h/.cpp files implement a XAML SurfaceImageSource using DirectX APIs for rendering the text layout.
5353

54-
### DWriteTextLayoutCloudFont project
55-
Within the DWriteTextLayoutCloudFont project, the following files are significant:
54+
### DWriteLineSpacingModes project
55+
Within the DWriteLineSpacingModes project, the following files are significant:
5656

5757
* The Scenario1\_DefaultSpacing.\*, Scenario2\_UniformSpacing.\* and Scenario3\_ProportionalSpacing.\* files each demonstrate a different line spacing method.
5858

@@ -72,9 +72,7 @@ Other files are boilerplate files used for UWP sample apps.
7272

7373
**Client:** Windows 10
7474

75-
**Server:** Windows Server 2016 Technical Preview
76-
77-
**Phone:** Windows 10
75+
**Server:** Windows Server 2016
7876

7977
## Build the sample
8078

Samples/Geolocation/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ description: "Shows how to get the geographic location of the user's device and
1717

1818
<!---
1919
category: MapsAndLocation
20-
samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=533278
20+
samplefwlink: https://go.microsoft.com/fwlink/p/?LinkId=533278
2121
--->
2222

2323
# Geolocation sample
@@ -34,7 +34,7 @@ After obtaining access to the user's location, an app can
3434

3535
> **Note:** This sample is part of a large collection of UWP feature samples.
3636
> You can download this sample as a standalone ZIP file
37-
> [from docs.microsoft.com](https://docs.microsoft.com/samples/microsoft/windows-universal-samples/geolocation/),
37+
> [from learn.microsoft.com](https://learn.microsoft.com/samples/microsoft/windows-universal-samples/geolocation/),
3838
> or you can download the entire collection as a single
3939
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/master.zip), but be
4040
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,
@@ -43,12 +43,12 @@ After obtaining access to the user's location, an app can
4343
4444
This sample also shows how to:
4545

46-
- **Use a [geofence](http://msdn.microsoft.com/library/windows/apps/dn263744):** Receive notifications when the user's device has entered or left an area of interest.
47-
- **Handle changes in location permissions**: Register for the Geolocator's StatusChanged event and use the [StatusChangedEventArgs](http://msdn.microsoft.com/library/windows/apps/br225600) to determine the current position status.
46+
- **Use a [geofence](https://learn.microsoft.com/uwp/api/windows.devices.geolocation.geofencing):** Receive notifications when the user's device has entered or left an area of interest.
47+
- **Handle changes in location permissions**: Register for the Geolocator's StatusChanged event and use the [StatusChangedEventArgs](https://learn.microsoft.com/uwp/api/windows.devices.geolocation.statuschangedeventargs) to determine the current position status.
4848
- **Get location from a background task**
4949
- **Handle geofencing events from a background task**
5050
- **Handle geovisit events from a background task**
51-
- **Obtain satellite data:** When available, use the [GeocoordinateSatelliteData](http://msdn.microsoft.com/library/windows/apps/jj635260) class to obtain additional information on the quality of the satellite based location data.
51+
- **Obtain satellite data:** When available, use the [GeocoordinateSatelliteData](https://learn.microsoft.com/uwp/api/windows.devices.geolocation.geocoordinatesatellitedata) class to obtain additional information on the quality of the satellite based location data.
5252
- **Display a toast:** Notify the user when a geofencing event has occurred in the background.
5353
- **Refresh geofence binding:** Refresh the binding on resume and after removal of a geofence. Note that removal requires subscribing to removal events if a geofence is set as single use or a duration is set.
5454
- **Request access to the user's location:** Request access to the user's location using the RequestAccessAsync method. Important: call the RequestAccessAsync before accessing the user's location. At that time, your app must be in the foreground and RequestAccessAsync must be called from the UI thread. Until the user grants your app permission to their location, your app can't access location data.
@@ -67,13 +67,13 @@ This sample requires that location capability be set in the *Package.appxmanifes
6767

6868
### Conceptual
6969

70-
- [Get current location](https://msdn.microsoft.com/library/windows/apps/mt219698)
71-
- [Guidelines for location-aware apps](https://msdn.microsoft.com/library/windows/apps/hh465148)
70+
- [Get current location](https://learn.microsoft.com/windows/uwp/maps-and-location/get-location)
71+
- [Guidelines for location-aware apps](https://learn.microsoft.com/windows/uwp/maps-and-location/guidelines-and-checklist-for-detecting-location)
7272

7373
### Reference
7474

75-
- [Windows.Devices.Geolocation](http://msdn.microsoft.com/library/windows/apps/br225603)
76-
- [Windows.Devices.Geolocation.Geofencing](https://msdn.microsoft.com/library/windows/apps/dn263744)
75+
- [Windows.Devices.Geolocation](https://learn.microsoft.com/uwp/api/windows.devices.geolocation)
76+
- [Windows.Devices.Geolocation.Geofencing](https://learn.microsoft.com/uwp/api/windows.devices.geolocation.geofencing)
7777

7878
### Related samples
7979

Samples/NetworkConnectivity/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ own logic to track network connectivity changes.
3434

3535
> **Note:** This sample is part of a large collection of UWP feature samples.
3636
> You can download this sample as a standalone ZIP file
37-
> [from docs.microsoft.com](https://docs.microsoft.com/samples/microsoft/windows-universal-samples/networkingconnectivity/),
37+
> [from learn.microsoft.com](https://learn.microsoft.com/samples/microsoft/windows-universal-samples/networkingconnectivity/),
3838
> or you can download the entire collection as a single
3939
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/main.zip), but be
4040
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,

Samples/RadioManager/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ description: "Shows how to enumerate radios on a device, toggle radio state chan
1717

1818
<!---
1919
category: NetworkingAndWebServices
20-
samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620590
20+
samplefwlink: https://go.microsoft.com/fwlink/p/?LinkId=620590
2121
--->
2222

2323
# Radios sample
2424

25-
Shows how to use the [Windows.Devices.Radios](https://msdn.microsoft.com/library/windows/apps/windows.devices.radios.aspx) API to enumerate radios on a device,
25+
Shows how to use the [Windows.Devices.Radios](https://learn.microsoft.com/uwp/api/windows.devices.radios) API to enumerate radios on a device,
2626
toggle radio state changes, and register for state changes on individual radios.
2727

2828
> **Note:** This sample is part of a large collection of UWP feature samples.
2929
> You can download this sample as a standalone ZIP file
30-
> [from docs.microsoft.com](https://docs.microsoft.com/samples/microsoft/windows-universal-samples/radiomanager/),
30+
> [from learn.microsoft.com](https://learn.microsoft.com/samples/microsoft/windows-universal-samples/radiomanager/),
3131
> or you can download the entire collection as a single
3232
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/master.zip), but be
3333
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,

Samples/ResizeAppView/cpp/Scenario1_Basic.xaml.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,8 @@ using namespace Windows::UI::Xaml;
2222
using namespace Windows::UI::Xaml::Controls;
2323
using namespace Windows::UI::Xaml::Input;
2424

25-
using namespace Windows::UI;
26-
27-
// This is a clone of IUIContentRoot but is not exclusiveto
28-
[uuid(1DFCBAC6-B36B-5CB9-9BC5-2B7A0EDDC378)]
29-
public interface class IUIContentRootClone
30-
{
31-
property Windows::UI::UIContext^ UIContext
32-
{
33-
Windows::UI::UIContext^ get();
34-
}
35-
};
36-
ref class MockUIContentRoot : public IUIContentRootClone {
37-
public:
38-
property Windows::UI::UIContext^ UIContext
39-
{ virtual Windows::UI::UIContext^ get() { return nullptr; }}
40-
41-
};
4225
Scenario1_Basic::Scenario1_Basic() : rootPage(MainPage::Current)
4326
{
44-
UIContentRoot^ root = safe_cast<UIContentRoot^>(reinterpret_cast<Object^>(ref new MockUIContentRoot()));
45-
__debugbreak();
46-
Windows::UI::UIContext^ c = root->UIContext;
4727
InitializeComponent();
4828
}
4929

Samples/ResizeAppView/cs/Scenario1_Basic.xaml.cs

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
//
1010
//*********************************************************
1111

12-
using System;
1312
using Windows.Foundation;
14-
using Windows.Storage.Streams;
1513
using Windows.UI.Core;
1614
using Windows.UI.ViewManagement;
1715
using Windows.UI.Xaml;
@@ -43,31 +41,19 @@ protected override void OnNavigatedFrom(NavigationEventArgs e)
4341
Window.Current.SizeChanged -= OnWindowSizeChanged;
4442
}
4543

46-
47-
IMemoryBufferReference mbrr = null;
48-
bool done = false;
49-
private void AttachRef()
50-
{
51-
var buffer = new Windows.Storage.Streams.Buffer(10);
52-
var memorybuffer = Windows.Storage.Streams.Buffer.CreateMemoryBufferOverIBuffer(buffer);
53-
memorybuffer.CreateReference().Closed += (s, _) => {
54-
//mbrr = s;
55-
var x = 42;
56-
done = true;
57-
};
58-
}
5944
private void ResizeView_Click(object sender, RoutedEventArgs e)
6045
{
6146
var view = ApplicationView.GetForCurrentView();
62-
_ = Windows.System.Threading.ThreadPool.RunAsync((o) => {
63-
AttachRef();
64-
while (!done)
65-
{
66-
GC.Collect();
67-
}
68-
mbrr = null;
69-
GC.Collect();
70-
});
47+
if (view.TryResizeView(new Size { Width = 600, Height = 500 }))
48+
{
49+
rootPage.NotifyUser("Resizing to 600 \u00D7 500", NotifyType.StatusMessage);
50+
// The SizeChanged event will be raised when the resize is complete.
51+
}
52+
else
53+
{
54+
// The system does not support resizing, or the provided size is out of range.
55+
rootPage.NotifyUser("Failed to resize view", NotifyType.ErrorMessage);
56+
}
7157
}
7258

7359
private void SetMinimumSize_Click(object sender, RoutedEventArgs e)

0 commit comments

Comments
 (0)