/ src / modules / cmdpal / Microsoft.CmdPal.UI / Controls / SourceRequestedEventArgs.cs
SourceRequestedEventArgs.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using CommunityToolkit.Common.Deferred;
 6  using Microsoft.UI.Xaml;
 7  using Microsoft.UI.Xaml.Controls;
 8  
 9  namespace Microsoft.CmdPal.UI.Controls;
10  
11  /// <summary>
12  /// See <see cref="IconBox.SourceRequested"/> event.
13  /// </summary>
14  public class SourceRequestedEventArgs(object? key, ElementTheme requestedTheme, double scale = 1.0) : DeferredEventArgs
15  {
16      public object? Key { get; private set; } = key;
17  
18      public IconSource? Value { get; set; }
19  
20      public ElementTheme Theme => requestedTheme;
21  
22      public double Scale => scale;
23  }