diff --git a/Ooui.Forms/Exports.cs b/Ooui.Forms/Exports.cs new file mode 100644 index 0000000..18a9908 --- /dev/null +++ b/Ooui.Forms/Exports.cs @@ -0,0 +1,20 @@ +using System; +using Ooui.Forms; +using Ooui.Forms.Renderers; +using Xamarin.Forms; +using Xamarin.Forms.Internals; + + +[assembly: ExportRenderer (typeof (Button), typeof (ButtonRenderer))] + +namespace Ooui.Forms +{ + [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)] + public sealed class ExportRendererAttribute : HandlerAttribute + { + public ExportRendererAttribute (Type handler, Type target) + : base (handler, target) + { + } + } +} diff --git a/Ooui.Forms/Ooui.Forms.csproj b/Ooui.Forms/Ooui.Forms.csproj new file mode 100644 index 0000000..aefd842 --- /dev/null +++ b/Ooui.Forms/Ooui.Forms.csproj @@ -0,0 +1,16 @@ + + + + netstandard2.0 + + + + + + + + + + + + diff --git a/Ooui.Forms/PageExtensions.cs b/Ooui.Forms/PageExtensions.cs new file mode 100644 index 0000000..398ad59 --- /dev/null +++ b/Ooui.Forms/PageExtensions.cs @@ -0,0 +1,11 @@ +using System; +namespace Ooui.Forms +{ + public static class PageExtensions + { + public static Element CreateElement (this Xamarin.Forms.Page page) + { + throw new NotImplementedException (); + } + } +} diff --git a/Ooui.Forms/Platform.cs b/Ooui.Forms/Platform.cs new file mode 100644 index 0000000..8a15080 --- /dev/null +++ b/Ooui.Forms/Platform.cs @@ -0,0 +1,27 @@ +using System; +using Xamarin.Forms; +using Xamarin.Forms.Internals; + +namespace Ooui.Forms +{ + public class Platform : BindableObject, IPlatform, IDisposable + { + bool _disposed; + + void IDisposable.Dispose() + { + if (_disposed) + return; + _disposed = true; + + MessagingCenter.Unsubscribe(this, Page.ActionSheetSignalName); + MessagingCenter.Unsubscribe(this, Page.AlertSignalName); + MessagingCenter.Unsubscribe(this, Page.BusySetSignalName); + } + + public SizeRequest GetNativeSize(VisualElement view, double widthConstraint, double heightConstraint) + { + return new SizeRequest(new Size(100, 100)); + } + } +} diff --git a/Ooui.Forms/Renderers/ButtonRenderer.cs b/Ooui.Forms/Renderers/ButtonRenderer.cs new file mode 100644 index 0000000..f272d7c --- /dev/null +++ b/Ooui.Forms/Renderers/ButtonRenderer.cs @@ -0,0 +1,12 @@ +using System; +using Xamarin.Forms; + +namespace Ooui.Forms.Renderers +{ + public class ButtonRenderer : ElementRenderer + { + public ButtonRenderer() + { + } + } +} diff --git a/Ooui.Forms/Renderers/ElementRenderer.cs b/Ooui.Forms/Renderers/ElementRenderer.cs new file mode 100644 index 0000000..e1eed11 --- /dev/null +++ b/Ooui.Forms/Renderers/ElementRenderer.cs @@ -0,0 +1,9 @@ +using System; +using Xamarin.Forms; + +namespace Ooui.Forms.Renderers +{ + public class ElementRenderer where TElement : View where TNativeElement : Ooui.Element + { + } +} \ No newline at end of file diff --git a/Ooui.sln b/Ooui.sln index c5823a7..ea96543 100644 --- a/Ooui.sln +++ b/Ooui.sln @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples", "Samples\Samples. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ooui.Forms", "Ooui.Forms\Ooui.Forms.csproj", "{DB819A2F-91E1-40FB-8D48-6544169966B8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -58,5 +60,28 @@ Global {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Release|x64.Build.0 = Release|x64 {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Release|x86.ActiveCfg = Release|x86 {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Release|x86.Build.0 = Release|x86 + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Debug|x64.ActiveCfg = Debug|Any CPU + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Debug|x64.Build.0 = Debug|Any CPU + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Debug|x86.ActiveCfg = Debug|Any CPU + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Debug|x86.Build.0 = Debug|Any CPU + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Release|Any CPU.Build.0 = Release|Any CPU + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Release|x64.ActiveCfg = Release|Any CPU + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Release|x64.Build.0 = Release|Any CPU + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Release|x86.ActiveCfg = Release|Any CPU + {DB819A2F-91E1-40FB-8D48-6544169966B8}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + Policies = $0 + $0.TextStylePolicy = $1 + $1.FileWidth = 128 + $1.NoTabsAfterNonTabs = True + $1.scope = text/x-csharp + $0.CSharpFormattingPolicy = $2 + $2.scope = text/x-csharp + $2.SpacingAfterMethodDeclarationName = True + $2.SpaceAfterMethodCallName = True EndGlobalSection EndGlobal