FindMyFiles
FindMyFiles.Views
ScopeManagerDialog Class
Wiring only: the scope-folder dialog (ADR-0024). Two contexts share it — the setup screen's "no admin?" link (first-run onboarding, folders only) and the gear menu's "Change search folders…" (re-selection, folders + excludes). State and the persist/relaunch live on the shared MainViewModel; the buttons drive its actions through the sanctioned Forget(this Task, string) funnel (CLAUDE.md convention). The mirror of ServiceManagerDialog for the non-elevated path.
public sealed class ScopeManagerDialog : Microsoft.UI.Xaml.Controls.ContentDialog, Microsoft.UI.Xaml.Markup.IComponentConnector
Inheritance System.Object → Microsoft.UI.Xaml.DependencyObject → Microsoft.UI.Xaml.UIElement → Microsoft.UI.Xaml.FrameworkElement → Microsoft.UI.Xaml.Controls.Control → Microsoft.UI.Xaml.Controls.ContentControl → Microsoft.UI.Xaml.Controls.ContentDialog → ScopeManagerDialog
Implements Microsoft.UI.Xaml.Markup.IComponentConnector
Properties
ScopeManagerDialog.ShowExcludes Property
Whether the excludes section shows. False in the setup (first-run) context — excludes come later, once indexing has started, via the gear's "change search folders"; true for re-selection.
public bool ShowExcludes { get; }
Property Value
ScopeManagerDialog.VM Property
The page's ViewModel, shared so the dialog edits the same ScopeFolders the setup screen seeds.
public FindMyFiles.ViewModels.MainViewModel VM { get; }
Property Value
Methods
ScopeManagerDialog.Connect(int, object) Method
Connect()
public void Connect(int connectionId, object target);
Parameters
connectionId System.Int32
target System.Object
Implements Connect(int, object)
ScopeManagerDialog.GetBindingConnector(int, object) Method
GetBindingConnector(int connectionId, object target)
public Microsoft.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target);
Parameters
connectionId System.Int32
target System.Object
Implements GetBindingConnector(int, object)
Returns
Microsoft.UI.Xaml.Markup.IComponentConnector
ScopeManagerDialog.InitializeComponent() Method
InitializeComponent()
public void InitializeComponent();
ScopeManagerDialog.OpenAsync(MainViewModel, bool) Method
The single entry point (setup link / gear menu). Resolves a XamlRoot from the main window and guards against a second instance (ContentDialog allows only one open at a time). Named OpenAsync, not ShowAsync, to avoid hiding the inherited Microsoft.UI.Xaml.Controls.ContentDialog.ShowAsync.
public static System.Threading.Tasks.Task OpenAsync(FindMyFiles.ViewModels.MainViewModel vm, bool setup=false);
Parameters
The page ViewModel to edit.
setup System.Boolean
True for the first-run setup context (folders only, onboarding wording); false for re-selection (folders + excludes).
Returns
System.Threading.Tasks.Task
A System.Threading.Tasks.Task that completes when the dialog closes.