using System.Collections.Generic;
using ElmSharp;
namespace Xamarin.Forms.Platform.Tizen
{
///
/// Extension class, provides native embedding functionalities:
/// https://developer.xamarin.com/guides/xamarin-forms/user-interface/layouts/add-platform-controls/
///
///
/// This code is not used in the Xamarin.Forms.Platform.Tizen implementation, however it should not
/// be removed as it allows developers to use native controls directly.
///
public static class LayoutExtensions
{
///
/// Add the specified evas object to the list of children views.
///
/// The extended class.
/// Object to be added.
/// Optional delegate which provides measurements for the added object.
public static void Add(this IList children, EvasObject obj, MeasureDelegate measureDelegate = null)
{
children.Add(obj.ToView(measureDelegate));
}
///
/// Wraps the evas object into a view which can be used by Xamarin.
///
/// The Xamarin view which wraps the evas object.
/// The extended class.
/// Optional delegate which provides measurements for the evas object.
public static View ToView(this EvasObject obj, MeasureDelegate measureDelegate = null)
{
return new EvasObjectWrapper(obj, measureDelegate);
}
}
}