Use spaces to match Ooui

This commit is contained in:
Frank A. Krueger 2017-11-09 13:03:56 -08:00
parent e3627b5b90
commit a887133288
14 changed files with 560 additions and 552 deletions

View File

@ -4,6 +4,13 @@
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType></DebugType>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.4.0.38779" />
</ItemGroup>

View File

@ -103,7 +103,7 @@ namespace Ooui.Forms.Renderers
if (Element == null || Control == null)
return;
var uiControl = Control as Ooui.Element;
var uiControl = Control as Ooui.FormControl;
if (uiControl == null)
return;
uiControl.IsDisabled = !Element.IsEnabled;

View File

@ -19,8 +19,9 @@ namespace Ooui.Forms
{
readonly ConcurrentDictionary<string, object> values =
new ConcurrentDictionary<string, object> ();
#pragma warning disable 67
public event EventHandler<ResourcesChangedEventArgs> ValuesChanged;
#pragma warning restore 67
public bool TryGetValue (string key, out object value)
{

View File

@ -144,10 +144,11 @@ namespace Ooui.Forms
float newY = visualParent == null ? y : Math.Max (0, (float)(visualParent.Height - y - view.Height));
var target = new Rectangle (x, newY, width, height);
uiview.Style.Position = "absolute";
uiview.Style.Left = x;
uiview.Style.Top = newY;
uiview.Style.Width = width;
uiview.Style.Height = height;
uiview.Style.Right = x + width;
uiview.Style.Bottom = newY + height;
}
else if (width <= 0 || height <= 0) {
return;

View File

@ -79,6 +79,7 @@ Global
$1.FileWidth = 128
$1.NoTabsAfterNonTabs = True
$1.scope = text/x-csharp
$1.TabsToSpaces = True
$0.CSharpFormattingPolicy = $2
$2.scope = text/x-csharp
$2.NewLinesForBracesInProperties = False

View File

@ -25,12 +25,6 @@ namespace Ooui
set => SetProperty (ref hidden, value, "hidden");
}
bool disabled = false;
public bool IsDisabled {
get => disabled;
set => SetProperty (ref disabled, value, "disabled");
}
public event TargetEventHandler Clicked {
add => AddEventListener ("click", value);
remove => RemoveEventListener ("click", value);

View File

@ -272,6 +272,11 @@ namespace Ooui
}
}
public Value Position {
get => this["position"];
set => this["position"] = value;
}
public Value Right {
get => this["right"];
set => this["right"] = value;
@ -307,8 +312,7 @@ namespace Ooui
set => this["width"] = value;
}
public Value this [string propertyName]
{
public Value this[string propertyName] {
get {
lock (properties) {
Value p;