Give the editor a default size
This commit is contained in:
parent
85c7c74270
commit
11d9e1c2fb
|
@ -10,6 +10,12 @@ namespace Ooui.Forms.Renderers
|
|||
bool _disposed;
|
||||
IEditorController ElementController => Element;
|
||||
|
||||
public override SizeRequest GetDesiredSize (double widthConstraint, double heightConstraint)
|
||||
{
|
||||
var size = new Size (160, 100);
|
||||
return new SizeRequest (size, size);
|
||||
}
|
||||
|
||||
protected override void Dispose (bool disposing)
|
||||
{
|
||||
if (_disposed)
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Samples
|
|||
{
|
||||
public class EditorSample : ISample
|
||||
{
|
||||
public string Title => "Editor Sample";
|
||||
public string Title => "Xamarin.Forms Editor Sample";
|
||||
|
||||
public Ooui.Element CreateElement()
|
||||
{
|
||||
|
@ -13,7 +13,9 @@ namespace Samples
|
|||
|
||||
var titleLabel = new Xamarin.Forms.Label
|
||||
{
|
||||
Text = "Editor"
|
||||
Text = "Editor",
|
||||
FontSize = 24,
|
||||
FontAttributes = FontAttributes.Bold,
|
||||
};
|
||||
panel.Children.Add(titleLabel);
|
||||
|
||||
|
|
Loading…
Reference in New Issue