зеркало из https://github.com/DeGsoft/maui-linux.git
Merge branch '3.6.0' into 4.0.0
This commit is contained in:
Коммит
0ab3ea7f37
|
@ -43,7 +43,9 @@ using Xamarin.Forms.StyleSheets;
|
|||
[assembly: StyleProperty("background-image", typeof(Page), nameof(Page.BackgroundImageSourceProperty))]
|
||||
[assembly: StyleProperty("border-color", typeof(IBorderElement), nameof(BorderElement.BorderColorProperty))]
|
||||
[assembly: StyleProperty("border-radius", typeof(ICornerElement), nameof(CornerElement.CornerRadiusProperty))]
|
||||
[assembly: StyleProperty("border-radius", typeof(IBorderElement), nameof(BorderElement.CornerRadiusProperty))]
|
||||
[assembly: StyleProperty("border-radius", typeof(Button), nameof(Button.CornerRadiusProperty))]
|
||||
[assembly: StyleProperty("border-radius", typeof(Frame), nameof(Frame.CornerRadiusProperty))]
|
||||
[assembly: StyleProperty("border-radius", typeof(ImageButton), nameof(BorderElement.CornerRadiusProperty))]
|
||||
[assembly: StyleProperty("border-width", typeof(IBorderElement), nameof(BorderElement.BorderWidthProperty))]
|
||||
[assembly: StyleProperty("color", typeof(IColorElement), nameof(ColorElement.ColorProperty), Inherited = true)]
|
||||
[assembly: StyleProperty("color", typeof(ITextElement), nameof(TextElement.TextColorProperty), Inherited = true)]
|
||||
|
|
|
@ -4,6 +4,8 @@ using System.Windows;
|
|||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Platform.WPF;
|
||||
|
||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
||||
|
||||
[assembly: ExportRenderer(typeof(Layout), typeof(LayoutRenderer))]
|
||||
[assembly: ExportRenderer(typeof(Label), typeof(LabelRenderer))]
|
||||
[assembly: ExportRenderer(typeof(Button), typeof(ButtonRenderer))]
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Xamarin.Forms.Xaml.UnitTests.Gh6361">
|
||||
<ContentPage.Resources>
|
||||
<StyleSheet>
|
||||
<![CDATA[
|
||||
button {
|
||||
background-color: red;
|
||||
border-radius: 30;
|
||||
}
|
||||
|
||||
frame {
|
||||
background-color: red;
|
||||
border-radius: 30;
|
||||
}
|
||||
]]>
|
||||
</StyleSheet>
|
||||
</ContentPage.Resources>
|
||||
<StackLayout>
|
||||
<Button />
|
||||
<Frame />
|
||||
</StackLayout>
|
||||
</ContentPage>
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Core.UnitTests;
|
||||
|
||||
namespace Xamarin.Forms.Xaml.UnitTests
|
||||
{
|
||||
public partial class Gh6361 : ContentPage
|
||||
{
|
||||
public Gh6361() => InitializeComponent();
|
||||
public Gh6361(bool useCompiledXaml)
|
||||
{
|
||||
//this stub will be replaced at compile time
|
||||
}
|
||||
|
||||
[TestFixture]
|
||||
class Tests
|
||||
{
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
Device.PlatformServices = new MockPlatformServices();
|
||||
Xamarin.Forms.Internals.Registrar.RegisterAll(new Type[0]);
|
||||
}
|
||||
|
||||
[TearDown] public void TearDown() => Device.PlatformServices = null;
|
||||
|
||||
[Test]
|
||||
public void CSSBorderRadiusDoesNotFail([Values(false, true)]bool useCompiledXaml)
|
||||
{
|
||||
var layout = new Gh6361(useCompiledXaml);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче