namespace SummaryModule.Controls; /// /// Interaction logic for BaseRecipe.xaml /// public partial class BaseRecipe : UserControl { public BaseRecipe() { InitializeComponent(); } public RecipeDisplayVM DataSource { get { return (RecipeDisplayVM)GetValue(DataSourceProperty); } set { SetValue(DataSourceProperty, value); } } // Using a DependencyProperty as the backing store for DataSource. This enables animation, styling, binding, etc... public static readonly DependencyProperty DataSourceProperty = DependencyProperty.Register(nameof(DataSource), typeof(RecipeDisplayVM), typeof(BaseRecipe), new PropertyMetadata(default)); }