This was the only thing blocking me from signing off on #9224 in 1.7. ! CHANGE WARNING ! If we bind to `T.S.M.Command`s in XAML, then the compiler gets _very angry_ at us. It generates two different versions of `GetReferenceTypeMember_Icon` in `XamlTypeInfo.g.cpp`. Presumably because there's an Icon on a NavViewItem and an Icon on a Command. We don't really know why. Fortunately, the fix is "rename Command::Icon" to "Command::IconPath". It's dumb, but it works. Thanks for the help with that one Carlos ☺️ Unblocks #9224
30 lines
1 KiB
Plaintext
30 lines
1 KiB
Plaintext
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
import "KeyMapping.idl";
|
|
import "Profile.idl";
|
|
import "ColorScheme.idl";
|
|
import "TerminalWarnings.idl";
|
|
|
|
namespace Microsoft.Terminal.Settings.Model
|
|
{
|
|
[default_interface] runtimeclass Command : Windows.UI.Xaml.Data.INotifyPropertyChanged
|
|
{
|
|
Command();
|
|
|
|
String Name;
|
|
ActionAndArgs Action;
|
|
String KeyChordText;
|
|
|
|
String IconPath;
|
|
|
|
Boolean HasNestedCommands { get; };
|
|
Windows.Foundation.Collections.IMapView<String, Command> NestedCommands { get; };
|
|
|
|
static void ExpandCommands(Windows.Foundation.Collections.IMap<String, Command> commands,
|
|
Windows.Foundation.Collections.IVectorView<Profile> profiles,
|
|
Windows.Foundation.Collections.IVectorView<ColorScheme> schemes,
|
|
Windows.Foundation.Collections.IVector<SettingsLoadWarnings> warnings);
|
|
}
|
|
}
|