-
Notifications
You must be signed in to change notification settings - Fork 694
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(imagebrush): Improved the support of ImageBrush on Wasm
- Loading branch information
1 parent
26c0b06
commit af15d91
Showing
13 changed files
with
290 additions
and
297 deletions.
There are no files selected for viewing
102 changes: 43 additions & 59 deletions
102
...Tests.Shared/Windows_UI_Xaml_Media/ImageBrushTests/BorderImageBrushRelativeTransform.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 |
---|---|---|
@@ -1,64 +1,48 @@ | ||
<UserControl | ||
x:Class="GenericApp.Views.Content.UITests.ImageBrushTestControl.BorderImageBrushRelativeTransform" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:GenericApp.Views.Content.UITests.ImageBrushTestControl" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:ios="http://nventive.com/ios" | ||
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:android="http://nventive.com/android" | ||
xmlns:not_ios="http://nventive.com/not_ios" | ||
xmlns:shapes="clr-namespace:nVentive.Umbrella.Views.UI.Xaml.Shapes;assembly=nVentive.Umbrella" | ||
mc:Ignorable="d not_ios android" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:u="using:nVentive.Umbrella.Views.Controls" | ||
xmlns:controls="using:Uno.UI.Samples.Controls" | ||
xmlns:uBehaviors="using:nVentive.Umbrella.Views.Behaviors" | ||
d:DesignHeight="300" | ||
d:DesignWidth="400"> | ||
x:Class="GenericApp.Views.Content.UITests.ImageBrushTestControl.BorderImageBrushRelativeTransform" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:GenericApp.Views.Content.UITests.ImageBrushTestControl" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:ios="http://nventive.com/ios" | ||
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:android="http://nventive.com/android" | ||
xmlns:not_ios="http://nventive.com/not_ios" | ||
mc:Ignorable="d not_ios android" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
d:DesignHeight="300" | ||
d:DesignWidth="400"> | ||
|
||
<StackPanel> | ||
<Border> | ||
<controls:SampleControl SampleDescription="BorderImageBrushRelativeTransform"> | ||
<controls:SampleControl.SampleContent> | ||
<DataTemplate> | ||
|
||
<StackPanel > | ||
<Border BorderThickness="30" | ||
Width="200" | ||
Height="100"> | ||
<Border.Background> | ||
<ImageBrush ImageSource="http://lh5.ggpht.com/lxBMauupBiLIpgOgu5apeiX_YStXeHRLK1oneS4NfwwNt7fGDKMP0KpQIMwfjfL9GdHRVEavmg7gOrj5RYC4qwrjh3Y0jCWFDj83jzg"> | ||
<ImageBrush.RelativeTransform> | ||
<ScaleTransform ScaleX="2" | ||
ScaleY="3" | ||
CenterX=".5" | ||
CenterY=".5" /> | ||
</ImageBrush.RelativeTransform> | ||
</ImageBrush> | ||
</Border.Background> | ||
</Border> | ||
<StackPanel > | ||
<Border BorderThickness="30" | ||
Width="200" | ||
Height="100"> | ||
<Border.Background> | ||
<ImageBrush ImageSource="http://lh5.ggpht.com/lxBMauupBiLIpgOgu5apeiX_YStXeHRLK1oneS4NfwwNt7fGDKMP0KpQIMwfjfL9GdHRVEavmg7gOrj5RYC4qwrjh3Y0jCWFDj83jzg"> | ||
<ImageBrush.RelativeTransform> | ||
<ScaleTransform ScaleX="2" | ||
ScaleY="3" | ||
CenterX=".5" | ||
CenterY=".5" /> | ||
</ImageBrush.RelativeTransform> | ||
</ImageBrush> | ||
</Border.Background> | ||
</Border> | ||
|
||
<Border BorderThickness="30" | ||
Width="600" | ||
Height="300"> | ||
<Border.Background> | ||
<ImageBrush ImageSource="http://lh5.ggpht.com/lxBMauupBiLIpgOgu5apeiX_YStXeHRLK1oneS4NfwwNt7fGDKMP0KpQIMwfjfL9GdHRVEavmg7gOrj5RYC4qwrjh3Y0jCWFDj83jzg"> | ||
<ImageBrush.RelativeTransform> | ||
<ScaleTransform ScaleX="2" | ||
ScaleY="3" | ||
CenterX=".5" | ||
CenterY=".5" /> | ||
</ImageBrush.RelativeTransform> | ||
</ImageBrush> | ||
</Border.Background> | ||
</Border> | ||
<Border BorderThickness="30" | ||
Width="600" | ||
Height="300"> | ||
<Border.Background> | ||
<ImageBrush ImageSource="http://lh5.ggpht.com/lxBMauupBiLIpgOgu5apeiX_YStXeHRLK1oneS4NfwwNt7fGDKMP0KpQIMwfjfL9GdHRVEavmg7gOrj5RYC4qwrjh3Y0jCWFDj83jzg"> | ||
<ImageBrush.RelativeTransform> | ||
<ScaleTransform ScaleX="2" | ||
ScaleY="3" | ||
CenterX=".5" | ||
CenterY=".5" /> | ||
</ImageBrush.RelativeTransform> | ||
</ImageBrush> | ||
</Border.Background> | ||
</Border> | ||
|
||
</StackPanel> | ||
</DataTemplate> | ||
</controls:SampleControl.SampleContent> | ||
</controls:SampleControl> | ||
</Border> | ||
|
||
</StackPanel> | ||
</StackPanel> | ||
</UserControl> |
31 changes: 9 additions & 22 deletions
31
...ts.Shared/Windows_UI_Xaml_Media/ImageBrushTests/BorderImageBrushRelativeTransform.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 |
---|---|---|
@@ -1,27 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Uno.UI.Samples.Controls; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Windows.UI.Xaml; | ||
using Uno.UI.Samples.Controls; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Controls.Primitives; | ||
using Windows.UI.Xaml.Data; | ||
using Windows.UI.Xaml.Input; | ||
using Windows.UI.Xaml.Media; | ||
using Windows.UI.Xaml.Navigation; | ||
|
||
namespace GenericApp.Views.Content.UITests.ImageBrushTestControl | ||
{ | ||
[SampleControlInfo("ImageBrushTestControl", "BorderImageBrushRelativeTransform")] | ||
public sealed partial class BorderImageBrushRelativeTransform : UserControl | ||
{ | ||
public BorderImageBrushRelativeTransform() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
[Sample] | ||
public sealed partial class BorderImageBrushRelativeTransform : UserControl | ||
{ | ||
public BorderImageBrushRelativeTransform() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
} |
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.