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

31 строка
1.0 KiB
C#
Исходник Обычный вид История

2016-03-22 23:02:25 +03:00
using Windows.UI.Xaml;
namespace Xamarin.Forms.Platform.UWP
{
public class NativeViewWrapper : View
{
public NativeViewWrapper(FrameworkElement nativeElement, GetDesiredSizeDelegate getDesiredSizeDelegate = null, ArrangeOverrideDelegate arrangeOverrideDelegate = null,
MeasureOverrideDelegate measureOverrideDelegate = null)
{
GetDesiredSizeDelegate = getDesiredSizeDelegate;
ArrangeOverrideDelegate = arrangeOverrideDelegate;
MeasureOverrideDelegate = measureOverrideDelegate;
NativeElement = nativeElement;
nativeElement.TransferbindablePropertiesToWrapper(this);
2016-03-22 23:02:25 +03:00
}
public ArrangeOverrideDelegate ArrangeOverrideDelegate { get; set; }
public GetDesiredSizeDelegate GetDesiredSizeDelegate { get; }
public MeasureOverrideDelegate MeasureOverrideDelegate { get; set; }
public FrameworkElement NativeElement { get; }
protected override void OnBindingContextChanged()
{
NativeElement.SetBindingContext(BindingContext, nv => nv.GetChildren<FrameworkElement>());
base.OnBindingContextChanged();
}
2016-03-22 23:02:25 +03:00
}
}