Add chapter 10 sample project

This commit is contained in:
Alvin Ashcraft
2023-08-13 13:40:04 -04:00
parent f9e4d407b9
commit 90f935f4b2
91 changed files with 4110 additions and 0 deletions
@@ -0,0 +1,30 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using TemplateStudioSampleApp.Core.Models;
namespace TemplateStudioSampleApp.Views;
public sealed partial class ListDetailsDetailControl : UserControl
{
public SampleOrder? ListDetailsMenuItem
{
get => GetValue(ListDetailsMenuItemProperty) as SampleOrder;
set => SetValue(ListDetailsMenuItemProperty, value);
}
public static readonly DependencyProperty ListDetailsMenuItemProperty = DependencyProperty.Register("ListDetailsMenuItem", typeof(SampleOrder), typeof(ListDetailsDetailControl), new PropertyMetadata(null, OnListDetailsMenuItemPropertyChanged));
public ListDetailsDetailControl()
{
InitializeComponent();
}
private static void OnListDetailsMenuItemPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (d is ListDetailsDetailControl control)
{
control.ForegroundElement.ChangeView(0, 0, 1);
}
}
}