From fb6b1bb5187d01035a95098147619f8bdb53f871 Mon Sep 17 00:00:00 2001 From: Yusyuriv Date: Wed, 1 May 2024 14:19:20 +0600 Subject: [PATCH] Fix CardGroup overwriting DataContext of its children --- Flow.Launcher/Resources/Controls/CardGroup.xaml | 3 ++- Flow.Launcher/Resources/Controls/CardGroup.xaml.cs | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/Resources/Controls/CardGroup.xaml b/Flow.Launcher/Resources/Controls/CardGroup.xaml index d3383d20c..5ea9d1e60 100644 --- a/Flow.Launcher/Resources/Controls/CardGroup.xaml +++ b/Flow.Launcher/Resources/Controls/CardGroup.xaml @@ -26,6 +26,7 @@ - + diff --git a/Flow.Launcher/Resources/Controls/CardGroup.xaml.cs b/Flow.Launcher/Resources/Controls/CardGroup.xaml.cs index 6ddbf3597..02f4ca013 100644 --- a/Flow.Launcher/Resources/Controls/CardGroup.xaml.cs +++ b/Flow.Launcher/Resources/Controls/CardGroup.xaml.cs @@ -13,13 +13,12 @@ public partial class CardGroup : UserControl set { SetValue(ContentProperty, value); } } - public static readonly DependencyProperty ContentProperty = + public static new readonly DependencyProperty ContentProperty = DependencyProperty.Register(nameof(Content), typeof(ObservableCollection), typeof(CardGroup)); public CardGroup() { InitializeComponent(); - DataContext = this; Content = new ObservableCollection(); } }