diff --git a/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ComboBox.cs b/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ComboBox.cs index 14f614b8b747..f0d03ddeb3d2 100644 --- a/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ComboBox.cs +++ b/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ComboBox.cs @@ -36,7 +36,7 @@ public string Text } } #endif -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false [global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")] public global::Microsoft.UI.Xaml.Controls.ComboBoxSelectionChangedTrigger SelectionChangedTrigger { @@ -141,7 +141,7 @@ public object SelectionBoxItem new Microsoft.UI.Xaml.FrameworkPropertyMetadata(default(global::Microsoft.UI.Xaml.Media.Brush))); #endif // Skipping already declared property PlaceholderTextProperty -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false [global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")] public static global::Microsoft.UI.Xaml.DependencyProperty SelectionChangedTriggerProperty { get; } = Microsoft.UI.Xaml.DependencyProperty.Register( diff --git a/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ComboBoxSelectionChangedTrigger.cs b/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ComboBoxSelectionChangedTrigger.cs index 5287752c28fd..f2faad111f3b 100644 --- a/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ComboBoxSelectionChangedTrigger.cs +++ b/src/Uno.UI/Generated/3.0.0.0/Microsoft.UI.Xaml.Controls/ComboBoxSelectionChangedTrigger.cs @@ -3,7 +3,7 @@ #pragma warning disable 114 // new keyword hiding namespace Microsoft.UI.Xaml.Controls { -#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ +#if false public enum ComboBoxSelectionChangedTrigger { #if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ diff --git a/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.Properties.cs b/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.Properties.cs index fbcea4416525..01646da11160 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.Properties.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.Properties.cs @@ -183,6 +183,22 @@ public Brush PlaceholderForeground /// public DataTemplate SelectionBoxItemTemplate { get; private set; } + /// + /// Gets or sets a value that indicates what action causes a SelectionChanged event to occur. + /// + public ComboBoxSelectionChangedTrigger SelectionChangedTrigger + { + get => (ComboBoxSelectionChangedTrigger)GetValue(SelectionChangedTriggerProperty); + set => SetValue(SelectionChangedTriggerProperty, value); + } + + public static DependencyProperty SelectionChangedTriggerProperty { get; } = + DependencyProperty.Register( + nameof(SelectionChangedTrigger), + typeof(ComboBoxSelectionChangedTrigger), + typeof(ComboBox), + new FrameworkPropertyMetadata(default(ComboBoxSelectionChangedTrigger))); + /// /// Gets an object that provides calculated values that can be referenced /// as TemplateBinding sources when defining templates for a ComboBox control. diff --git a/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBoxSelectionChangedTrigger.cs b/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBoxSelectionChangedTrigger.cs new file mode 100644 index 000000000000..72406db37235 --- /dev/null +++ b/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBoxSelectionChangedTrigger.cs @@ -0,0 +1,17 @@ +namespace Microsoft.UI.Xaml.Controls; + +/// +/// Defines constants that specify what action causes a SelectionChanged event to occur. +/// +public enum ComboBoxSelectionChangedTrigger +{ + /// + /// A change event occurs when the user commits a selection in the combo box. + /// + Committed = 0, + + /// + /// A change event occurs each time the user navigates to a new selection in the combo box. + /// + Always = 1, +}