First pass at navigation with MasterDetail

This commit is contained in:
watsonb8
2019-05-17 18:21:02 -04:00
parent 4f8b6f49fa
commit 62579677cf
333 changed files with 5505 additions and 31 deletions

View File

@ -0,0 +1,38 @@
using System;
using Xamarin.Forms;
namespace Aurora.Frontend.Components
{
public class ContentPresenter : ContentView
{
public static readonly BindableProperty ItemTemplateProperty = BindableProperty.Create("ItemTemplate", typeof(DataTemplate), typeof(ContentPresenter), null, propertyChanged: OnItemTemplateChanged);
private static void OnItemTemplateChanged(BindableObject bindable, object oldvalue, object newvalue)
{
var cp = (ContentPresenter)bindable;
var template = cp.ItemTemplate;
if (template != null)
{
var content = (View)template.CreateContent();
cp.Content = content;
}
else
{
cp.Content = null;
}
}
public DataTemplate ItemTemplate
{
get
{
return (DataTemplate)GetValue(ItemTemplateProperty);
}
set
{
SetValue(ItemTemplateProperty, value);
}
}
}
}