зеркало из https://github.com/DeGsoft/maui-linux.git
[UWP] Fix ActivityIndicator width in absolutelayout (#3224)
* [Core] Fix autosize elements in absolute layout * revert the Hasflag extension * - refactoring to the local UWP fix for Activity Indicator - fixes #1399
This commit is contained in:
Родитель
491947606d
Коммит
e0e10f16c1
|
@ -0,0 +1,22 @@
|
|||
using Xamarin.Forms.CustomAttributes;
|
||||
using Xamarin.Forms.Internals;
|
||||
|
||||
namespace Xamarin.Forms.Controls.Issues
|
||||
{
|
||||
[Preserve(AllMembers = true)]
|
||||
[Issue(IssueTracker.Github, 1399, "ActivityIndicator width is autosize in absolutelayout", PlatformAffected.UWP)]
|
||||
public class Issue1399 : TestContentPage
|
||||
{
|
||||
protected override void Init()
|
||||
{
|
||||
Content = new AbsoluteLayout()
|
||||
{
|
||||
Children = {
|
||||
new Label { Text = "cat", WidthRequest = 0},
|
||||
new Image { Source = "coffee.png", WidthRequest = 0},
|
||||
new ActivityIndicator { IsRunning = true }
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -273,6 +273,7 @@
|
|||
<Compile Include="$(MSBuildThisFileDirectory)Issue1556.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue1799.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue1931.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue1399.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue2187.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue3001.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Issue3271.cs" />
|
||||
|
|
|
@ -12,5 +12,12 @@ namespace Xamarin.Forms.Platform.UWP
|
|||
get { return (double)GetValue(ElementOpacityProperty); }
|
||||
set { SetValue(ElementOpacityProperty, value); }
|
||||
}
|
||||
|
||||
protected override Windows.Foundation.Size MeasureOverride(Windows.Foundation.Size availableSize)
|
||||
{
|
||||
var result = base.MeasureOverride(availableSize);
|
||||
result.Width = availableSize.Width;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче