-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
229 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
FunctionZero.Maui.Controls/Controls/TransformContentPresenter/BackdropContentContainer.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
x:Class="FunctionZero.Maui.Controls.BackdropContentContainer" | ||
x:Name="Self" | ||
> | ||
<!-- Any layout that allows a child to fill its render area will do. Custom layout would be better? --> | ||
<ContentView.ControlTemplate> | ||
<ControlTemplate> | ||
<Grid> | ||
<Grid BackgroundColor="{TemplateBinding BackdropColor, Mode=OneWay}" Opacity="{TemplateBinding BackdropOpacity, Mode=OneWay}"/> | ||
|
||
<ContentPresenter /> | ||
</Grid> | ||
</ControlTemplate> | ||
</ContentView.ControlTemplate> | ||
|
||
</ContentView> |
43 changes: 43 additions & 0 deletions
43
...ionZero.Maui.Controls/Controls/TransformContentPresenter/BackdropContentContainer.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
namespace FunctionZero.Maui.Controls; | ||
|
||
public partial class BackdropContentContainer : ContentView | ||
{ | ||
public BackdropContentContainer() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
#region BackdropOpacityProperty | ||
|
||
public static readonly BindableProperty BackdropOpacityProperty = BindableProperty.Create(nameof(BackdropOpacity), typeof(double), typeof(BackdropContentContainer), 1.0, BindingMode.OneWay, null, BackdropOpacityChanged); | ||
|
||
public double BackdropOpacity | ||
{ | ||
get { return (double)GetValue(BackdropOpacityProperty); } | ||
set { SetValue(BackdropOpacityProperty, value); } | ||
} | ||
|
||
private static void BackdropOpacityChanged(BindableObject bindable, object oldValue, object newValue) | ||
{ | ||
var self = (BackdropContentContainer)bindable; | ||
} | ||
|
||
#endregion | ||
|
||
#region BackdropColorProperty | ||
|
||
public static readonly BindableProperty BackdropColorProperty = BindableProperty.Create(nameof(BackdropColor), typeof(Color), typeof(BackdropContentContainer), Colors.Black, BindingMode.OneWay, null, BackdropColorChanged); | ||
|
||
public Color BackdropColor | ||
{ | ||
get { return (Color)GetValue(BackdropColorProperty); } | ||
set { SetValue(BackdropColorProperty, value); } | ||
} | ||
|
||
private static void BackdropColorChanged(BindableObject bindable, object oldValue, object newValue) | ||
{ | ||
var self = (BackdropContentContainer)bindable; | ||
} | ||
|
||
#endregion | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.