Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Samples/AppContentSearch/cs-winui/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<ItemGroup>
<!-- This sample requires experimental Windows App SDK for AppContentSearch APIs. -->
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="2.0.0-experimental3" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="2.1.4-experimental8" />
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.2.0" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.4948" />

Expand Down
4 changes: 2 additions & 2 deletions Samples/AppContentSearch/cs-winui/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.Windows.AI.Search.Experimental.AppContentIndex;
using Microsoft.Windows.Search.AppContentIndex;
using Notes.Controls;
using Notes.Pages;
using Notes.ViewModels;
Expand Down Expand Up @@ -98,7 +98,7 @@ private async Task InitializeAppContentIndexerAsync()
GetOrCreateIndexResult? getOrCreateResult = null;
await Task.Run(() =>
{
getOrCreateResult = Microsoft.Windows.AI.Search.Experimental.AppContentIndex.AppContentIndexer.GetOrCreateIndex("NotesIndex");
getOrCreateResult = Microsoft.Windows.Search.AppContentIndex.AppContentIndexer.GetOrCreateIndex("NotesIndex");
if (getOrCreateResult == null)
{
throw new Exception("GetOrCreateIndexResult is null");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.

using Microsoft.Windows.AI.Search.Experimental.AppContentIndex;
using Microsoft.Windows.Search.AppContentIndex;
using Notes.Models;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -46,7 +46,7 @@ public async static Task RemoveAttachment(Attachment attachment)
{
await Task.Run(() =>
{
MainWindow.AppContentIndexer.Remove(attachment.Id.ToString());
MainWindow.AppContentIndexer.RemoveContentItem(attachment.Id.ToString());
});
Debug.WriteLine($"Deleted image from index: {attachment.Filename}");
}
Expand Down
10 changes: 5 additions & 5 deletions Samples/AppContentSearch/cs-winui/Utils/Utils.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.

using Microsoft.Windows.AI.Search.Experimental.AppContentIndex;
using Microsoft.Windows.Search.AppContentIndex;
using Notes.ViewModels;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -149,7 +149,7 @@ await Task.Run(() =>
AppManagedImageQueryMatch? imageMatch = match as AppManagedImageQueryMatch;
if (imageMatch != null)
{
Debug.WriteLine($"Image match: {imageMatch.ContentId}, Subregion: {imageMatch.Subregion}");
Debug.WriteLine($"Image match: {imageMatch.ContentId}, Subregion: {imageMatch.RegionOfInterest}");
var searchResult = new SearchResult
{
ContentType = ContentType.Image,
Expand Down Expand Up @@ -187,9 +187,9 @@ await Task.Run(() =>
// Capture bounding box if present (Subregion is IReference<Rect>)
try
{
if (imageMatch.Subregion != null)
if (imageMatch.RegionOfInterest != null)
{
var rect = imageMatch.Subregion.Value;
var rect = imageMatch.RegionOfInterest.Value;
searchResult.BoundingBox = rect;
}
}
Expand Down
10 changes: 5 additions & 5 deletions Samples/AppContentSearch/cs-winui/ViewModels/NoteViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.

using CommunityToolkit.Mvvm.ComponentModel;
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
using Microsoft.Windows.AI.Search.Experimental.AppContentIndex;
using Microsoft.Windows.Search.AppContentIndex;
using Notes.Models;
using System;
using System.Collections.ObjectModel;
Expand Down Expand Up @@ -220,7 +220,7 @@ public async Task RemoveNoteFromIndexAsync()
{
await Task.Run(() =>
{
MainWindow.AppContentIndexer.Remove(Note.Id.ToString());
MainWindow.AppContentIndexer.RemoveContentItem(Note.Id.ToString());
});
Debug.WriteLine($"Deleted note from index: {Note.Filename}");
}
Expand All @@ -247,7 +247,7 @@ public async static Task ManualDeleteIndex()
{
await Task.Run(() =>
{
MainWindow.AppContentIndexer.RemoveAll();
MainWindow.AppContentIndexer.RemoveAllContentItems();
});
Debug.WriteLine($"Deleted Index");
}
Expand Down Expand Up @@ -327,7 +327,7 @@ private async Task SaveContentToFileDeleteAndReIndex()

await Task.Run(() =>
{
MainWindow.AppContentIndexer.Remove(Note.Id.ToString());
MainWindow.AppContentIndexer.RemoveContentItem(Note.Id.ToString());
});
Debug.WriteLine($"Deleted note {Note.Title}");

Expand Down
2 changes: 1 addition & 1 deletion Samples/WindowsML/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ItemGroup>
<!-- WindowsAppSDK packages -->
<PackageVersion Include="Microsoft.ML.OnnxRuntimeGenAI.WinML" Version="0.10.1" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="2.0.0-experimental3" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="2.1.3" />
<!-- Other dependencies -->
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.3179.45" />
<PackageVersion Include="Microsoft.Windows.AbiWinRT" Version="2.0.210330.2" />
Expand Down