Partial views, filling up UI
This commit is contained in:
30
AdventureWorks.MAUI/ViewsPartial/HeaderView.xaml.cs
Normal file
30
AdventureWorks.MAUI/ViewsPartial/HeaderView.xaml.cs
Normal file
@ -0,0 +1,30 @@
|
||||
namespace AdventureWorks.MAUI.ViewsPartial;
|
||||
|
||||
public partial class HeaderView : ContentView
|
||||
{
|
||||
public HeaderView()
|
||||
{
|
||||
InitializeComponent();
|
||||
ViewTitle = "View Title";
|
||||
ViewDescription = "View Description";
|
||||
this.BindingContext = this;
|
||||
}
|
||||
|
||||
public string ViewTitle
|
||||
{
|
||||
get { return (string)GetValue(ViewTitleProperty); }
|
||||
set { SetValue(ViewTitleProperty, value); }
|
||||
}
|
||||
|
||||
public string ViewDescription
|
||||
{
|
||||
get { return (string)GetValue(ViewDescriptionProperty); }
|
||||
set { SetValue(ViewDescriptionProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly BindableProperty ViewTitleProperty =
|
||||
BindableProperty.Create(nameof(ViewTitle), typeof(string), typeof(HeaderView), string.Empty);
|
||||
|
||||
public static readonly BindableProperty ViewDescriptionProperty =
|
||||
BindableProperty.Create(nameof(ViewDescription), typeof(string), typeof(HeaderView), default(string));
|
||||
}
|
||||
Reference in New Issue
Block a user