-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a default template for the surfaces
Fixes #296
- Loading branch information
1 parent
b51fc91
commit 6be893b
Showing
3 changed files
with
35 additions
and
1 deletion.
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
23 changes: 23 additions & 0 deletions
23
source/SkiaSharp.Extended.UI.Maui/Controls/SKSurfaceViewResources.shared.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,23 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:local="clr-namespace:SkiaSharp.Extended.UI.Controls" | ||
xmlns:skia="clr-namespace:SkiaSharp.Views.Maui.Controls;assembly=SkiaSharp.Views.Maui.Controls" | ||
x:Class="SkiaSharp.Extended.UI.Controls.Themes.SKSurfaceViewResources"> | ||
|
||
<!-- the control template for SKSurfaceView --> | ||
<ControlTemplate x:Key="SKSurfaceViewControlTemplate"> | ||
<skia:SKCanvasView x:Name="PART_DrawingSurface" /> | ||
</ControlTemplate> | ||
|
||
<!-- the explicit style that allows for extension --> | ||
<Style x:Key="SKSurfaceViewStyle" TargetType="local:SKSurfaceView"> | ||
<Setter Property="ControlTemplate" | ||
Value="{StaticResource SKSurfaceViewControlTemplate}" /> | ||
</Style> | ||
|
||
<!-- the implicit style that applies to all controls --> | ||
<Style TargetType="local:SKSurfaceView" | ||
ApplyToDerivedTypes="True" | ||
BasedOn="{StaticResource SKSurfaceViewStyle}" /> | ||
|
||
</ResourceDictionary> |
9 changes: 9 additions & 0 deletions
9
source/SkiaSharp.Extended.UI.Maui/Controls/SKSurfaceViewResources.shared.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,9 @@ | ||
namespace SkiaSharp.Extended.UI.Controls.Themes; | ||
|
||
public partial class SKSurfaceViewResources : ResourceDictionary | ||
{ | ||
public SKSurfaceViewResources() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} |