parent
251b6ececf
commit
e695efac91
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:local="clr-namespace:Views"
|
||||
x:Class="Views.ContainerWithHeader"
|
||||
x:Name="root">
|
||||
|
||||
<Grid RowDefinitions="50, *">
|
||||
<local:CustomHeader
|
||||
HeightRequest="80"
|
||||
VerticalOptions="Start"
|
||||
Padding="10, 0"/>
|
||||
<ContentView
|
||||
Grid.Row="1"
|
||||
Content="{Binding MyContent, Source={x:Reference root}}"/>
|
||||
</Grid>
|
||||
|
||||
</ContentView>
|
@ -0,0 +1,18 @@
|
||||
namespace Views;
|
||||
|
||||
public partial class ContainerWithHeader : ContentView
|
||||
{
|
||||
public ContainerWithHeader()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public static BindableProperty MyContentProperty =
|
||||
BindableProperty.Create("MyContent", typeof(View), typeof(ContainerWithHeader), new Grid());
|
||||
|
||||
public View MyContent
|
||||
{
|
||||
get => (View)GetValue(MyContentProperty);
|
||||
set => SetValue(MyContentProperty, value);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue