maui-linux/Xamarin.Forms.Platform.Tizen/NativeViewWrapper.cs

35 строки
871 B
C#
Исходник Обычный вид История

2017-12-04 17:30:43 +03:00
using ElmSharp;
using ESize = ElmSharp.Size;
namespace Xamarin.Forms.Platform.Tizen
{
public delegate ESize? MeasureDelegate(NativeViewWrapperRenderer renderer, int availableWidth, int availableHeight);
2017-12-04 17:30:43 +03:00
public class NativeViewWrapper : View
2017-12-04 17:30:43 +03:00
{
public NativeViewWrapper(EvasObject obj, MeasureDelegate measureDelegate = null)
2017-12-04 17:30:43 +03:00
{
EvasObject = obj;
MeasureDelegate = measureDelegate;
obj.TransferBindablePropertiesToWrapper(this);
}
public EvasObject EvasObject
{
get;
private set;
}
public MeasureDelegate MeasureDelegate { get; }
protected override void OnBindingContextChanged()
{
// TODO: we should provide a delegate to obtain children of a Container object,
// however currently there is no way to get the list of children
EvasObject.SetBindingContext(BindingContext);
base.OnBindingContextChanged();
}
}
}