if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- public new static Alignment DownCast(BaseHandle handle)
+ public static Alignment DownCast(BaseHandle handle)
{
Alignment ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Alignment;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- public new static GaussianBlurView DownCast(BaseHandle handle)
+ public static GaussianBlurView DownCast(BaseHandle handle)
{
GaussianBlurView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as GaussianBlurView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal new static ItemView DownCast(BaseHandle handle)
+ internal static ItemView DownCast(BaseHandle handle)
{
ItemView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as ItemView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- public new static Model3dView DownCast(BaseHandle handle)
+ public static Model3dView DownCast(BaseHandle handle)
{
Model3dView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Model3dView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- public new static PageTurnView DownCast(BaseHandle handle)
+ public static PageTurnView DownCast(BaseHandle handle)
{
PageTurnView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PageTurnView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// A three-dimensional size.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- [Obsolete("Please do not use! This will be deprecated! Please use Size2D instead!")]
[Tizen.NUI.Binding.TypeConverter(typeof(SizeTypeConverter))]
[EditorBrowsable(EditorBrowsableState.Never)]
public class Size : global::System.IDisposable
return ret;
}
- internal new static WebViewLite DownCast(BaseHandle handle) {
+ internal static WebViewLite DownCast(BaseHandle handle) {
WebViewLite ret = new WebViewLite(NDalicPINVOKE.WebViewLite_DownCast(BaseHandle.getCPtr(handle)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
public Application()
{
- var f = false;
+ // var f = false;
// if (f)
// Loader.Load();
NavigationProxy = new NavigationImpl(this);
namespace Tizen.NUI.Internals
{
- [Obsolete]
[EditorBrowsable(EditorBrowsableState.Never)]
internal interface IDataTemplate
{
static IList<KeyValuePair<Layout, int>> s_resolutionList = new List<KeyValuePair<Layout, int>>();
static bool s_relayoutInProgress;
- bool _allocatedFlag;
+ //bool _allocatedFlag;
bool _hasDoneLayout;
Size _lastLayoutSize = new Size(-1, -1, 0);
set { SetValue(IsClippedToBoundsProperty, value); }
}
- public Thickness Padding
+
+ public new Thickness Padding
{
get { return (Thickness)GetValue(PaddingElement.PaddingProperty); }
set { SetValue(PaddingElement.PaddingProperty, value); }
get { return _logicalChildren ?? (_logicalChildren = new ReadOnlyCollection<Element>(InternalChildren)); }
}
+ /// <summary>
+ /// Raised when the layout of the Page has changed.
+ /// </summary>
public event EventHandler LayoutChanged;
[EditorBrowsable(EditorBrowsableState.Never)]
- public IReadOnlyList<Element> Children
+ public new IReadOnlyList<Element> Children
{
get { return InternalChildren; }
}
public static void LayoutChildIntoBoundingRegion(/*VisualElement*/BaseHandle child, Rectangle region)
{
//var parent = child.Parent as IFlowDirectionController;
- bool isRightToLeft = false;
+ //bool isRightToLeft = false;
//if (parent != null && (isRightToLeft = parent.EffectiveFlowDirection.IsRightToLeft()))
//region = new Rectangle(parent.Width - region.Right, region.Y, region.Width, region.Height);
public void LowerChild(View view)
{
- if (!InternalChildren.Contains(view) || InternalChildren.First() == view)
+ if (!InternalChildren.Contains(view) || (InternalChildren.First() as BaseHandle) == view)
return;
InternalChildren.Move(InternalChildren.IndexOf(view), 0);
public void RaiseChild(View view)
{
- if (!InternalChildren.Contains(view) || InternalChildren.Last() == view)
+ if (!InternalChildren.Contains(view) || (InternalChildren.Last() as BaseHandle) == view)
return;
InternalChildren.Move(InternalChildren.IndexOf(view), InternalChildren.Count - 1);
internal static void LayoutChildIntoBoundingRegion(View child, Rectangle region, SizeRequest childSizeRequest)
{
// var parent = child.Parent as IFlowDirectionController;
- bool isRightToLeft = false;
+ // bool isRightToLeft = false;
// if (parent != null && (isRightToLeft = parent.EffectiveFlowDirection.IsRightToLeft()))
// region = new Rectangle(parent.Width - region.Right, region.Y, region.Width, region.Height);
for (var index = 0; index < count; index++)
{
var v = LogicalChildrenInternal[index] as /*VisualElement*/BaseHandle;
- // if (v != null && v.IsVisible && (!v.IsPlatformEnabled || !v.IsNativeStateConsistent))
+ if (v != null /*&& v.IsVisible && (!v.IsPlatformEnabled || !v.IsNativeStateConsistent)*/)
return;
}
// }
}
- _allocatedFlag = false;
+ //_allocatedFlag = false;
if (trigger == InvalidationTrigger.RendererReady)
{
// InvalidateMeasureInternal(InvalidationTrigger.RendererReady);
if (v == null)
continue;
- if (item == this)
+ if ((item as BaseHandle) == this)
throw new InvalidOperationException("Can not add self to own child collection.");
OnInternalAdded(v);
namespace Tizen.NUI.Internals
{
+ /// <summary>
+ /// For internal use.
+ /// </summary>
+ /// <typeparam name="TRegistrable"></typeparam>
[EditorBrowsable(EditorBrowsableState.Never)]
public class Registrar<TRegistrable> where TRegistrable : class
{
readonly Dictionary<Type, Type> _handlers = new Dictionary<Type, Type>();
+ /// <summary>
+ /// Register.
+ /// </summary>
+ /// <param name="tview">The type of the view</param>
+ /// <param name="trender">The type of the render.</param>
public void Register(Type tview, Type trender)
{
//avoid caching null renderers
return (TRegistrable)DependencyResolver.ResolveOrCreate(handlerType, args);
}
+ /// <summary>
+ /// For internal use. Returns handler.
+ /// </summary>
+ /// <typeparam name="TOut">The type of the handler</typeparam>
+ /// <param name="type">The type.</param>
+ /// <returns>The handler instance.</returns>
public TOut GetHandler<TOut>(Type type) where TOut : TRegistrable
{
return (TOut)GetHandler(type);
}
+ /// <summary>
+ /// For internal use. Returns handler.
+ /// </summary>
+ /// <typeparam name="TOut">The type of the handler</typeparam>
+ /// <param name="type">The type.</param>
+ /// <param name="args">The args of the type</param>
+ /// <returns>The handler instance.</returns>
public TOut GetHandler<TOut>(Type type, params object[] args) where TOut : TRegistrable
{
return (TOut)GetHandler(type, args);
}
+ /// <summary>
+ /// For internal use. Return the handler of the object.
+ /// </summary>
+ /// <typeparam name="TOut">Thetype</typeparam>
+ /// <param name="obj">The object instance.</param>
+ /// <returns>The handle of the obj.</returns>
public TOut GetHandlerForObject<TOut>(object obj) where TOut : TRegistrable
{
if (obj == null)
return (TOut)GetHandler(type);
}
+ /// <summary>
+ /// For inetrnal use. Return the handler of the object.
+ /// </summary>
+ /// <typeparam name="TOut">The type</typeparam>
+ /// <param name="obj">The object instance</param>
+ /// <param name="args">The args of the type</param>
+ /// <returns>The handler of the object.</returns>
public TOut GetHandlerForObject<TOut>(object obj, params object[] args) where TOut : TRegistrable
{
if (obj == null)
return (TOut)GetHandler(type, args);
}
+ /// <summary>
+ /// For internal use. Returns the handle type.
+ /// </summary>
+ /// <param name="viewType">The view type.</param>
+ /// <returns>The type of the handle.</returns>
public Type GetHandlerType(Type viewType)
{
Type type;
return type;
}
+ /// <summary>
+ /// For internal use. Return the handle type of the object
+ /// </summary>
+ /// <param name="obj">The object instance.</param>
+ /// <returns>The type of the handler.</returns>
public Type GetHandlerTypeForObject(object obj)
{
if (obj == null)
}
}
+ /// <summary>
+ /// For internal use
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
internal static class Registrar
{
"BaseHandle handle = new ImageView(imagePath); " +
"ImageView image = handle as ImageView")]
[EditorBrowsable(EditorBrowsableState.Never)]
- public new static ImageView DownCast(BaseHandle handle)
+ public static ImageView DownCast(BaseHandle handle)
{
ImageView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as ImageView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
"BaseHandle handle = new TextLabel(\"Hello World!\"); " +
"TextLabel label = handle as TextLabel")]
[EditorBrowsable(EditorBrowsableState.Never)]
- public new static TextLabel DownCast(BaseHandle handle)
+ public static TextLabel DownCast(BaseHandle handle)
{
TextLabel ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
{
internal static readonly BindablePropertyKey NavigationPropertyKey = BindableProperty.CreateReadOnly("Navigation", typeof(INavigation), typeof(/*VisualElement*/BaseHandle), default(INavigation));
+ /// <summary>
+ /// Backing store for the Navigation property.
+ /// </summary>
public static readonly BindableProperty NavigationProperty = NavigationPropertyKey.BindableProperty;
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
}
}
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public NavigationProxy NavigationProxy
{
get { return Navigation as NavigationProxy; }
}
+
+ /// <summary>
+ /// Gets the navigation.
+ /// </summary>
public INavigation Navigation
{
get { return (INavigation)GetValue(NavigationProperty); }
internal set { SetValue(NavigationPropertyKey, value); }
}
+ /// <summary>
+ /// Contains event arguments for the FocusChangeRequested event.
+ /// </summary>
public class FocusRequestArgs : EventArgs
{
+
+ /// <summary>
+ /// Gets or sets a value that indicates the starting focus state of the element for which a focus change is requested.
+ /// </summary>
public bool Focus { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value that indicates the ending focus state of the element for which a focus change is requested.
+ /// </summary>
public bool Result { get; set; }
}
}
/// <pre>The child container has been initialized.</pre>
/// <returns>The parent container.</returns>
/// <since_tizen> 4 </since_tizen>
- public Container Parent
+ public new Container Parent
{
get
{
public static readonly int FrameDelay = NDalic.IMAGE_VISUAL_FRAME_DELAY;
/// <summary>
/// The number of times the AnimatedImageVisual will be looped
- /// Default -1. if < 0, loop unlimited. else, loop loopCount times.
+ /// Default -1. if less than 0, loop unlimited. else, loop loopCount times.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public static readonly int LoopCount = NDalic.IMAGE_VISUAL_LOOP_COUNT;
-/** Copyright (c) 2017 Samsung Electronics Co., Ltd.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*/
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
using System.ComponentModel;
namespace Tizen.NUI
private object _originalValue = null;
private object _originalKey = null;
+ /// <summary>
+ /// Int key.
+ /// </summary>
public int? KeyInt = null;
+
+ /// <summary>
+ /// String key.
+ /// </summary>
public string KeyString = null;
+
+ /// <summary>
+ /// True value.
+ /// </summary>
public PropertyValue TrueValue = null;
/// <summary>
NUILog.Debug($"(0x{swigCPtr.Handle:X})Timer() contructor!");
}
+ /// <summary>
+ /// Destructor.
+ /// </summary>
~Timer()
{
NUILog.Debug($"(0x{swigCPtr.Handle:X})Timer() distructor!, disposed={disposed}");
/// <param name="handle">The handle to an object.</param>
/// <returns>The handle to a slider or an uninitialized handle.</returns>
/// <since_tizen> 3 </since_tizen>
- public new static Slider DownCast(BaseHandle handle)
+ public static Slider DownCast(BaseHandle handle)
{
Slider ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Slider;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <summary>
/// Gets and Sets the number of times the AnimatedImageVisual will be looped.
- /// Default -1. if < 0, loop unlimited. else, loop loopCount times.
+ /// Default -1. if less than 0, loop unlimited. else, loop loopCount times.
/// </summary>
/// <since_tizen> 5 </since_tizen>
public float LoopCount
}
- internal new static WidgetView DownCast(BaseHandle handle)
+ internal static WidgetView DownCast(BaseHandle handle)
{
WidgetView ret = new WidgetView(NDalicManualPINVOKE.WidgetView_DownCast(BaseHandle.getCPtr(handle)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
namespace Tizen.NUI.Xaml
{
+ /// <summary>
+ /// Extension class for View defining Xamarin.Forms.Xaml.Extensions.LoadFromXaml{TView} method.
+ /// </summary>
public static class Extensions
{
+ /// <summary>
+ /// Returns an initialized view by loading the specified xaml.
+ /// </summary>
+ /// <typeparam name="TXaml">The type of view to initialize with state from XAML.</typeparam>
+ /// <param name="view">The view on which this method operates.</param>
+ /// <param name="callingType">The type of the caller.</param>
+ /// <returns>A TXaml with the properties that are defined in the application manifest for callingType.</returns>
public static TXaml LoadFromXaml<TXaml>(this TXaml view, Type callingType)
{
XamlLoader.Load(view, callingType);
return view;
}
+ /// <summary>
+ /// Returns a TXaml with the properties that are defined in the application manifest for callingType.
+ /// </summary>
+ /// <typeparam name="TXaml">The type of view to initialize with state from XAML.</typeparam>
+ /// <param name="view">The view on which this method operates.</param>
+ /// <param name="xaml">The XAML that encodes the view state.</param>
+ /// <returns>A TXaml with the properties that are defined in the application manifest for callingType.</returns>
public static TXaml LoadFromXaml<TXaml>(this TXaml view, string xaml)
{
XamlLoader.Load(view, xaml);
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// Provides a mechanism by which application developers can propagate changes that are made to data in one object to another, by enabling validation, type coercion, and an event system.
+ /// </summary>
public abstract class BindableObject : INotifyPropertyChanged, IDynamicResourceHandler
{
+ /// <summary>
+ /// Implements the bound property whose interface is provided by the BindingContext property.
+ /// </summary>
public static readonly BindableProperty BindingContextProperty =
BindableProperty.Create("BindingContext", typeof(object), typeof(BindableObject), default(object),
BindingMode.OneWay, null, BindingContextPropertyChanged, null, null, BindingContextPropertyBindingChanging);
bool _applying;
object _inheritedContext;
+ /// <summary>
+ /// Gets or sets object that contains the properties that will be targeted by the bound properties that belong to this BindableObject.
+ /// </summary>
public object BindingContext
{
get { return _inheritedContext ?? GetValue(BindingContextProperty); }
SetDynamicResource(property, key, false);
}
+ /// <summary>
+ /// Raised when a property has changed.
+ /// </summary>
public event PropertyChangedEventHandler PropertyChanged;
+ /// <summary>
+ /// Raised whenever the BindingContext property changes.
+ /// </summary>
public event EventHandler BindingContextChanged;
internal void ClearValue(BindableProperty property, bool fromStyle)
ClearValue(property, fromStyle: fromStyle, checkAccess: true);
}
- public void ClearValue(BindableProperty property)
+ /// <summary>
+ /// Clears any value set by Xamarin.Forms.BindableObject.SetValue.
+ /// </summary>
+ /// <param name="property">The BindableProperty to clear</param>
+ public void ClearValue(BindableProperty property)
{
ClearValue(property, fromStyle: false, checkAccess: true);
}
- public void ClearValue(BindablePropertyKey propertyKey)
+ /// <summary>
+ /// Clears any value set by Xamarin.Forms.BindableObject.SetValue for the property that is identified by propertyKey.
+ /// </summary>
+ /// <param name="propertyKey">The BindablePropertyKey that identifies the BindableProperty to clear.</param>
+ public void ClearValue(BindablePropertyKey propertyKey)
{
if (propertyKey == null)
throw new ArgumentNullException("propertyKey");
ClearValue(propertyKey.BindableProperty, fromStyle:false, checkAccess: false);
}
+ /// <summary>
+ /// Return true if the target property exists and has been set.
+ /// </summary>
+ /// <param name="targetProperty">The target property</param>
+ /// <returns>return true if the target property exists and has been set</returns>
public bool IsSet(BindableProperty targetProperty)
{
if (targetProperty == null)
&& (bpcontext.Attributes & BindableContextAttributes.IsDefaultValue) == 0;
}
+ /// <summary>
+ /// Returns the value that is contained the BindableProperty.
+ /// </summary>
+ /// <param name="property">The BindableProperty for which to get the value.</param>
+ /// <returns>The value that is contained the BindableProperty</returns>
public object GetValue(BindableProperty property)
{
if (property == null)
return context.Value;
}
+ /// <summary>
+ /// Raised when a property is about to change.
+ /// </summary>
public event PropertyChangingEventHandler PropertyChanging;
- public void RemoveBinding(BindableProperty property)
+ /// <summary>
+ /// Removes a previously set binding.
+ /// </summary>
+ /// <param name="property">The BindableProperty from which to remove bindings.</param>
+ public void RemoveBinding(BindableProperty property)
{
if (property == null)
throw new ArgumentNullException("property");
RemoveBinding(property, context);
}
- public void SetBinding(BindableProperty targetProperty, BindingBase binding)
+ /// <summary>
+ /// Assigns a binding to a property.
+ /// </summary>
+ /// <param name="targetProperty">The BindableProperty on which to set a binding.</param>
+ /// <param name="binding">The binding to set.</param>
+ public void SetBinding(BindableProperty targetProperty, BindingBase binding)
{
SetBinding(targetProperty, binding, false);
}
+ /// <summary>
+ /// Sets the value of the specified property.
+ /// </summary>
+ /// <param name="property">The BindableProperty on which to assign a value.</param>
+ /// <param name="value">The value to set.</param>
public void SetValue(BindableProperty property, object value)
{
SetValue(property, value, false, true);
}
+ /// <summary>
+ /// Sets the value of the propertyKey.
+ /// </summary>
+ /// <param name="propertyKey">The BindablePropertyKey on which to assign a value.</param>
+ /// <param name="value">The value to set.</param>
public void SetValue(BindablePropertyKey propertyKey, object value)
{
if (propertyKey == null)
SetValue(propertyKey.BindableProperty, value, false, false);
}
+ /// <summary>
+ /// Set the inherited context to a neated element.
+ /// </summary>
+ /// <param name="bindable">The object on which to set the inherited binding context.</param>
+ /// <param name="value">The inherited context to set.</param>
[EditorBrowsable(EditorBrowsableState.Never)]
public static void SetInheritedBindingContext(BindableObject bindable, object value)
{
bindable.OnBindingContextChanged();
}
+ /// <summary>
+ /// Apply the bindings to BindingContext.
+ /// </summary>
protected void ApplyBindings()
{
ApplyBindings(skipBindingContext: false, fromBindingContextChanged: false);
}
+ /// <summary>
+ /// Override this method to execute an action when the BindingContext changes.
+ /// </summary>
protected virtual void OnBindingContextChanged()
{
BindingContextChanged?.Invoke(this, EventArgs.Empty);
}
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ /// <summary>
+ /// Call this method from a child class to notify that a change happened on a property.
+ /// </summary>
+ /// <param name="propertyName">The name of the property that changed.</param>
+ protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ /// <summary>
+ /// Call this method from a child class to notify that a change is going to happen on a property.
+ /// </summary>
+ /// <param name="propertyName">The name of the property that is changing.</param>
protected virtual void OnPropertyChanging([CallerMemberName] string propertyName = null)
=> PropertyChanging?.Invoke(this, new PropertyChangingEventArgs(propertyName));
+ /// <summary>
+ /// Unapplies all previously set bindings.
+ /// </summary>
protected void UnapplyBindings()
{
for (int i = 0, _propertiesCount = _properties.Count; i < _propertiesCount; i++) {
return bpcontext != null && bpcontext.Binding != null;
}
+ /// <summary>
+ /// Returns the value that is contained the BindableProperty.
+ /// </summary>
+ /// <param name="property0">The BindableProperty instance.</param>
+ /// <param name="property1">The BindableProperty instance.</param>
+ /// <returns>The value that is contained the BindableProperty</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public object[] GetValues(BindableProperty property0, BindableProperty property1)
{
return values;
}
+ /// <summary>
+ /// Returns the value that is contained the BindableProperty.
+ /// </summary>
+ /// <param name="property0">The BindableProperty instance.</param>
+ /// <param name="property1">The BindableProperty instance.</param>
+ /// <param name="property2">The BindableProperty instance.</param>
+ /// <returns>The value that is contained the BindableProperty</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public object[] GetValues(BindableProperty property0, BindableProperty property1, BindableProperty property2)
{
return values;
}
+ /// <summary>
+ /// Returns the value that is contained the BindableProperty.
+ /// </summary>
+ /// <param name="properties">The array of the BindableProperty instances</param>
+ /// <returns>The values that is contained the BindableProperty instances.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
internal object[] GetValues(params BindableProperty[] properties)
{
SetValueCore(propertyKey.BindableProperty, value, attributes, SetValuePrivateFlags.None);
}
+ /// <summary>
+ /// For internal use.
+ /// </summary>
+ /// <param name="property">The BindableProperty on which to assign a value.</param>
+ /// <param name="value">The value to set</param>
+ /// <param name="attributes">The set value flag</param>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetValueCore(BindableProperty property, object value, SetValueFlags attributes = SetValueFlags.None)
{
namespace Tizen.NUI.Internals
{
+ /// <summary>
+ /// SetValueFlags. For internal use.
+ /// </summary>
[Flags]
[EditorBrowsable(EditorBrowsableState.Never)]
public enum SetValueFlags
{
+ /// <summary>
+ /// None.
+ /// </summary>
None = 0,
+
+ /// <summary>
+ /// Clear OneWay bindings.
+ /// </summary>
ClearOneWayBindings = 1 << 0,
+
+ /// <summary>
+ /// Clear TwoWay bindings.
+ /// </summary>
ClearTwoWayBindings = 1 << 1,
+
+ /// <summary>
+ /// Clear dynamic resource.
+ /// </summary>
ClearDynamicResource = 1 << 2,
+
+ /// <summary>
+ /// Raise or equal.
+ /// </summary>
RaiseOnEqual = 1 << 3
}
}
\ No newline at end of file
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// A BindableProperty is a backing store for properties allowing bindings on BindableObject.
+ /// </summary>
[DebuggerDisplay("{PropertyName}")]
[TypeConverter(typeof(BindablePropertyConverter))]
public sealed class BindableProperty
{
+ /// <summary>
+ /// Delegate for BindableProperty.PropertyChanged.
+ /// </summary>
+ /// <param name="bindable">The bindable object that contains the property.</param>
+ /// <param name="oldValue">The old property value.</param>
+ /// <param name="newValue">The new property value.</param>
public delegate void BindingPropertyChangedDelegate(BindableObject bindable, object oldValue, object newValue);
+ /// <summary>
+ /// Strongly-typed delegate for BindableProperty.PropertyChanged.
+ /// </summary>
+ /// <typeparam name="TPropertyType">The type of the bound property.</typeparam>
+ /// <param name="bindable">The bindable object that contains the property.</param>
+ /// <param name="oldValue">The old property value.</param>
+ /// <param name="newValue">The new property value.</param>
public delegate void BindingPropertyChangedDelegate<in TPropertyType>(BindableObject bindable, TPropertyType oldValue, TPropertyType newValue);
+ /// <summary>
+ /// Delegate for BindableProperty.PropertyChanging.
+ /// </summary>
+ /// <param name="bindable">The bindable object that contains the property.</param>
+ /// <param name="oldValue">The old property value.</param>
+ /// <param name="newValue">The new property value.</param>
public delegate void BindingPropertyChangingDelegate(BindableObject bindable, object oldValue, object newValue);
+ /// <summary>
+ /// Strongly-typed delegate for BindableProperty.PropertyChanging.
+ /// </summary>
+ /// <typeparam name="TPropertyType">The type of the bound property.</typeparam>
+ /// <param name="bindable">The bindable object that contains the property.</param>
+ /// <param name="oldValue">The old property value.</param>
+ /// <param name="newValue">The new property value.</param>
public delegate void BindingPropertyChangingDelegate<in TPropertyType>(BindableObject bindable, TPropertyType oldValue, TPropertyType newValue);
+ /// <summary>
+ /// Delegate for BindableProperty.CoerceValue.
+ /// </summary>
+ /// <param name="bindable">The bindable object that contains the property.</param>
+ /// <param name="value">The value to coerce.</param>
+ /// <returns>System.Object</returns>
public delegate object CoerceValueDelegate(BindableObject bindable, object value);
+ /// <summary>
+ /// Strongly-typed delegate for BindableProperty.CoerceValue.
+ /// </summary>
+ /// <typeparam name="TPropertyType">The type of the bound property.</typeparam>
+ /// <param name="bindable">The bindable object that contains the property.</param>
+ /// <param name="value">The value to coerce.</param>
+ /// <returns>TPropertyType</returns>
public delegate TPropertyType CoerceValueDelegate<TPropertyType>(BindableObject bindable, TPropertyType value);
+ /// <summary>
+ /// Delegate for BindableProperty.DefaultValueCreator.
+ /// </summary>
+ /// <param name="bindable">The bindable object that contains the property.</param>
+ /// <returns>System.Object</returns>
public delegate object CreateDefaultValueDelegate(BindableObject bindable);
+ /// <summary>
+ /// Strongly-typed delegate for BindableProperty.DefaultValueCreator.
+ /// </summary>
+ /// <typeparam name="TDeclarer">The type of the object that delared the property.</typeparam>
+ /// <typeparam name="TPropertyType">The type of the bound property.</typeparam>
+ /// <param name="bindable">The bindable object that contains the property.</param>
+ /// <returns>TPropertyType</returns>
public delegate TPropertyType CreateDefaultValueDelegate<in TDeclarer, out TPropertyType>(TDeclarer bindable);
+ /// <summary>
+ /// Delegate for BindableProperty.ValidateValue.
+ /// </summary>
+ /// <param name="bindable">The bindable object that contains the property.</param>
+ /// <param name="value">The default value.</param>
+ /// <returns>System.Boolean</returns>
public delegate bool ValidateValueDelegate(BindableObject bindable, object value);
+ /// <summary>
+ /// Strongly-typed delegate for BindableProperty.ValidateValue.
+ /// </summary>
+ /// <typeparam name="TPropertyType">The type of the bound property.</typeparam>
+ /// <param name="bindable">The bindable object that contains the property.</param>
+ /// <param name="value">The default value.</param>
+ /// <returns>System.Boolean</returns>
public delegate bool ValidateValueDelegate<in TPropertyType>(BindableObject bindable, TPropertyType value);
static readonly Dictionary<Type, TypeConverter> WellKnownConvertTypes = new Dictionary<Type,TypeConverter>
DefaultValueCreator = defaultValueCreator;
}
- public Type DeclaringType { get; private set; }
+ /// <summary>
+ /// Gets the type declaring the BindableProperty.
+ /// </summary>
+ public Type DeclaringType { get; private set; }
+ /// <summary>
+ /// Gets the default BindingMode.
+ /// </summary>
public BindingMode DefaultBindingMode { get; private set; }
- public object DefaultValue { get; }
+ /// <summary>
+ /// Gets the default value for the BindableProperty.
+ /// </summary>
+ public object DefaultValue { get; }
+ /// <summary>
+ /// Gets a value indicating if the BindableProperty is created form a BindablePropertyKey.
+ /// </summary>
public bool IsReadOnly { get; private set; }
+ /// <summary>
+ /// Gets the property name.
+ /// </summary>
public string PropertyName { get; }
+ /// <summary>
+ /// Gets the type of the BindableProperty.
+ /// </summary>
public Type ReturnType { get; }
internal BindablePropertyBindingChanging BindingChanging { get; private set; }
internal ValidateValueDelegate ValidateValue { get; private set; }
+ /// <summary>
+ /// Deprecated. Do not use.
+ /// </summary>
+ /// <typeparam name="TDeclarer">The type of the declaring object.</typeparam>
+ /// <typeparam name="TPropertyType">The type of the property.</typeparam>
+ /// <param name="getter">An expression identifying the getter for the property using this BindableProperty as backing store.</param>
+ /// <param name="defaultValue">The default value for the property.</param>
+ /// <param name="defaultBindingMode">The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay.</param>
+ /// <param name="validateValue">A delegate to be run when a value is set. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanged">A delegate to be run when the value has changed. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanging">A delegate to be run when the value will change. This parameter is optional. Default is null.</param>
+ /// <param name="coerceValue">A delegate used to coerce the range of a value. This parameter is optional. Default is null.</param>
+ /// <param name="defaultValueCreator">A Func used to initialize default value for reference types.</param>
+ /// <returns>A newly created BindableProperty.</returns>
[Obsolete("Create<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
public static BindableProperty Create<TDeclarer, TPropertyType>(Expression<Func<TDeclarer, TPropertyType>> getter, TPropertyType defaultValue, BindingMode defaultBindingMode = BindingMode.OneWay,
ValidateValueDelegate<TPropertyType> validateValue = null, BindingPropertyChangedDelegate<TPropertyType> propertyChanged = null,
return Create(getter, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, null, defaultValueCreator: defaultValueCreator);
}
+ /// <summary>
+ /// Creates a new instance of the BindableProperty class.
+ /// </summary>
+ /// <param name="propertyName">The name of the BindableProperty.</param>
+ /// <param name="returnType">The type of the property.</param>
+ /// <param name="declaringType">The type of the declaring object.</param>
+ /// <param name="defaultValue">The default value for the property.</param>
+ /// <param name="defaultBindingMode">The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay.</param>
+ /// <param name="validateValue">A delegate to be run when a value is set. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanged">A delegate to be run when the value has changed. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanging">A delegate to be run when the value will change. This parameter is optional. Default is null.</param>
+ /// <param name="coerceValue">A delegate used to coerce the range of a value. This parameter is optional. Default is null.</param>
+ /// <param name="defaultValueCreator">A Func used to initialize default value for reference types.</param>
+ /// <returns>A newly created BindableProperty.</returns>
public static BindableProperty Create(string propertyName, Type returnType, Type declaringType, object defaultValue = null, BindingMode defaultBindingMode = BindingMode.OneWay,
ValidateValueDelegate validateValue = null, BindingPropertyChangedDelegate propertyChanged = null, BindingPropertyChangingDelegate propertyChanging = null,
CoerceValueDelegate coerceValue = null, CreateDefaultValueDelegate defaultValueCreator = null)
defaultValueCreator: defaultValueCreator);
}
+ /// <summary>
+ /// Deprecated. Do not use.
+ /// </summary>
+ /// <typeparam name="TDeclarer">The type of the declaring object.</typeparam>
+ /// <typeparam name="TPropertyType">The type of the property.</typeparam>
+ /// <param name="staticgetter">An expression identifying a static method returning the value of the property using this BindableProperty as backing store.</param>
+ /// <param name="defaultValue">The default value for the property.</param>
+ /// <param name="defaultBindingMode">The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay.</param>
+ /// <param name="validateValue">A delegate to be run when a value is set. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanged">A delegate to be run when the value has changed. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanging">A delegate to be run when the value will change. This parameter is optional. Default is null.</param>
+ /// <param name="coerceValue">A delegate used to coerce the range of a value. This parameter is optional. Default is null.</param>
+ /// <param name="defaultValueCreator">A Func used to initialize default value for reference types.</param>
[Obsolete("CreateAttached<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
public static BindableProperty CreateAttached<TDeclarer, TPropertyType>(Expression<Func<BindableObject, TPropertyType>> staticgetter, TPropertyType defaultValue,
BindingMode defaultBindingMode = BindingMode.OneWay, ValidateValueDelegate<TPropertyType> validateValue = null, BindingPropertyChangedDelegate<TPropertyType> propertyChanged = null,
defaultValueCreator: defaultValueCreator);
}
+ /// <summary>
+ /// Creates a new instance of the BindableProperty class for an attached property.
+ /// </summary>
+ /// <param name="propertyName">The name of the BindableProperty.</param>
+ /// <param name="returnType">The type of the property.</param>
+ /// <param name="declaringType">The type of the declaring object.</param>
+ /// <param name="defaultValue">The default value for the property.</param>
+ /// <param name="defaultBindingMode">The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay.</param>
+ /// <param name="validateValue">A delegate to be run when a value is set. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanged">A delegate to be run when the value has changed. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanging">A delegate to be run when the value will change. This parameter is optional. Default is null.</param>
+ /// <param name="coerceValue">A delegate used to coerce the range of a value. This parameter is optional. Default is null.</param>
+ /// <param name="defaultValueCreator">A Func used to initialize default value for reference types.</param>
+ /// <returns>A newly created BindableProperty.</returns>
public static BindableProperty CreateAttached(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode = BindingMode.OneWay,
ValidateValueDelegate validateValue = null, BindingPropertyChangedDelegate propertyChanged = null, BindingPropertyChangingDelegate propertyChanging = null,
CoerceValueDelegate coerceValue = null, CreateDefaultValueDelegate defaultValueCreator = null)
return CreateAttached(propertyName, returnType, declaringType, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, null, false, defaultValueCreator);
}
+ /// <summary>
+ /// Deprecated. Do not use.
+ /// </summary>
+ /// <typeparam name="TDeclarer">The type of the declaring object.</typeparam>
+ /// <typeparam name="TPropertyType">The type of the property.</typeparam>
+ /// <param name="staticgetter">An expression identifying a static method returning the value of the property using this BindableProperty as backing store.</param>
+ /// <param name="defaultValue">The default value for the property.</param>
+ /// <param name="defaultBindingMode">The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay.</param>
+ /// <param name="validateValue">A delegate to be run when a value is set. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanged">A delegate to be run when the value has changed. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanging">A delegate to be run when the value will change. This parameter is optional. Default is null.</param>
+ /// <param name="coerceValue">A delegate used to coerce the range of a value. This parameter is optional. Default is null.</param>
+ /// <param name="defaultValueCreator">A Func used to initialize default value for reference types.</param>
+ /// <returns>A newly created attached read-only BindablePropertyKey.</returns>
[Obsolete("CreateAttachedReadOnly<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
public static BindablePropertyKey CreateAttachedReadOnly<TDeclarer, TPropertyType>(Expression<Func<BindableObject, TPropertyType>> staticgetter, TPropertyType defaultValue,
BindingMode defaultBindingMode = BindingMode.OneWayToSource, ValidateValueDelegate<TPropertyType> validateValue = null,
defaultValueCreator));
}
+ /// <summary>
+ /// Creates a new instance of the BindableProperty class for attached read-only properties.
+ /// </summary>
+ /// <param name="propertyName">The name of the BindableProperty.</param>
+ /// <param name="returnType">The type of the property.</param>
+ /// <param name="declaringType">The type of the declaring object.</param>
+ /// <param name="defaultValue">The default value for the property.</param>
+ /// <param name="defaultBindingMode">The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay.</param>
+ /// <param name="validateValue">A delegate to be run when a value is set. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanged">A delegate to be run when the value has changed. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanging">A delegate to be run when the value will change. This parameter is optional. Default is null.</param>
+ /// <param name="coerceValue">A delegate used to coerce the range of a value. This parameter is optional. Default is null.</param>
+ /// <param name="defaultValueCreator">A Func used to initialize default value for reference types.</param>
+ /// <returns>A newly created attached read-only BindablePropertyKey.</returns>
public static BindablePropertyKey CreateAttachedReadOnly(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode = BindingMode.OneWayToSource,
ValidateValueDelegate validateValue = null, BindingPropertyChangedDelegate propertyChanged = null, BindingPropertyChangingDelegate propertyChanging = null,
CoerceValueDelegate coerceValue = null, CreateDefaultValueDelegate defaultValueCreator = null)
defaultValueCreator));
}
+ /// <summary>
+ /// Deprecated. Do not use.
+ /// </summary>
+ /// <typeparam name="TDeclarer">The type of the declaring object.</typeparam>
+ /// <typeparam name="TPropertyType">The type of the property.</typeparam>
+ /// <param name="getter">An expression identifying the getter for the property using this BindableProperty as backing store.</param>
+ /// <param name="defaultValue">The default value for the property.</param>
+ /// <param name="defaultBindingMode">The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay.</param>
+ /// <param name="validateValue">A delegate to be run when a value is set. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanged">A delegate to be run when the value has changed. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanging">A delegate to be run when the value will change. This parameter is optional. Default is null.</param>
+ /// <param name="coerceValue">A delegate used to coerce the range of a value. This parameter is optional. Default is null.</param>
+ /// <param name="defaultValueCreator">A Func used to initialize default value for reference types.</param>
+ /// <returns>A newly created BindablePropertyKey.</returns>
[Obsolete("CreateReadOnly<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
public static BindablePropertyKey CreateReadOnly<TDeclarer, TPropertyType>(Expression<Func<TDeclarer, TPropertyType>> getter, TPropertyType defaultValue,
BindingMode defaultBindingMode = BindingMode.OneWayToSource, ValidateValueDelegate<TPropertyType> validateValue = null,
return new BindablePropertyKey(Create(getter, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, null, true, defaultValueCreator));
}
+ /// <summary>
+ /// Creates a new instance of the BindablePropertyKey class.
+ /// </summary>
+ /// <param name="propertyName">The name of the BindableProperty.</param>
+ /// <param name="returnType">The type of the property.</param>
+ /// <param name="declaringType">The type of the declaring object.</param>
+ /// <param name="defaultValue">The default value for the property.</param>
+ /// <param name="defaultBindingMode">The BindingMode to use on SetBinding() if no BindingMode is given. This parameter is optional. Default is BindingMode.OneWay.</param>
+ /// <param name="validateValue">A delegate to be run when a value is set. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanged">A delegate to be run when the value has changed. This parameter is optional. Default is null.</param>
+ /// <param name="propertyChanging">A delegate to be run when the value will change. This parameter is optional. Default is null.</param>
+ /// <param name="coerceValue">A delegate used to coerce the range of a value. This parameter is optional. Default is null.</param>
+ /// <param name="defaultValueCreator">A Func used to initialize default value for reference types.</param>
+ /// <returns>A newly created BindablePropertyKey.</returns>
public static BindablePropertyKey CreateReadOnly(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode = BindingMode.OneWayToSource,
ValidateValueDelegate validateValue = null, BindingPropertyChangedDelegate propertyChanged = null, BindingPropertyChangingDelegate propertyChanging = null,
CoerceValueDelegate coerceValue = null, CreateDefaultValueDelegate defaultValueCreator = null)
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// The secret key to a BindableProperty, used to implement a BindableProperty with restricted write access.
+ /// </summary>
public sealed class BindablePropertyKey
{
internal BindablePropertyKey(BindableProperty property)
BindableProperty = property;
}
+ /// <summary>
+ /// Gets the BindableProperty.
+ /// </summary>
public BindableProperty BindableProperty { get; private set; }
}
}
\ No newline at end of file
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// An abstract class that provides a BindingMode and a formatting option.
+ /// </summary>
public abstract class BindingBase
{
static readonly ConditionalWeakTable<IEnumerable, CollectionSynchronizationContext> SynchronizedCollections = new ConditionalWeakTable<IEnumerable, CollectionSynchronizationContext>();
{
}
+ /// <summary>
+ /// Gets or sets the mode for this binding.
+ /// </summary>
public BindingMode Mode
{
get { return _mode; }
}
}
+ /// <summary>
+ /// Gets or sets the string format for this binding.
+ /// </summary>
public string StringFormat
{
get { return _stringFormat; }
internal bool IsApplied { get; private set; }
+ /// <summary>
+ /// Stops synchronization on the collection.
+ /// </summary>
+ /// <param name="collection">The collection on which to stop synchronization.</param>
public static void DisableCollectionSynchronization(IEnumerable collection)
{
if (collection == null)
SynchronizedCollections.Add(collection, new CollectionSynchronizationContext(context, callback));
}
+ /// <summary>
+ /// Throws an InvalidOperationException if the binding has been applied.
+ /// </summary>
protected void ThrowIfApplied()
{
if (IsApplied)
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// The direction of changes propagation for bindings.
+ /// </summary>
public enum BindingMode
{
+ /// <summary>
+ /// When used in Bindings, indicates that the Binding should use the DefaultBindingMode. When used in BindableProperty declaration, defaults to BindingMode.OneWay.
+ /// </summary>
Default,
+
+ /// <summary>
+ /// Indicates that the binding should propagates changes from source (usually the View Model) to target (the BindableObject) in both directions.
+ /// </summary>
TwoWay,
+
+ /// <summary>
+ /// Indicates that the binding should only propagate changes from source (usually the View Model) to target (the BindableObject). This is the default mode for most BindableProperty values.
+ /// </summary>
OneWay,
+
+ /// <summary>
+ /// Indicates that the binding should only propagate changes from target (the BindableObject) to source (usually the View Model). This is mainly used for read-only BindableProperty values.
+ /// </summary>
OneWayToSource,
+
+ /// <summary>
+ /// Indicates that the binding will be applied only when the binding context changes and the value will not be monitored for changes with INotifyPropertyChanged.
+ /// </summary>
OneTime,
}
}
\ No newline at end of file
}
}
+ /// <summary>
+ /// Defines an ICommand implementation that wraps a Action.
+ /// </summary>
public class Command : ICommand
{
readonly Func<object, bool> _canExecute;
readonly Action<object> _execute;
+ /// <summary>
+ /// Initializes a new instance of the Command class.
+ /// </summary>
+ /// <param name="execute">An instance to execute when the Command is executed.</param>
public Command(Action<object> execute)
{
if (execute == null)
_execute = execute;
}
+ /// <summary>
+ /// Initializes a new instance of the Command class.
+ /// </summary>
+ /// <param name="execute">An Action to execute when the Command is executed.</param>
public Command(Action execute) : this(o => execute())
{
if (execute == null)
throw new ArgumentNullException(nameof(execute));
}
+ /// <summary>
+ /// Initializes a new instance of the Command class.
+ /// </summary>
+ /// <param name="execute">An Action to execute when the Command is executed.</param>
+ /// <param name="canExecute">A instance indicating if the Command can be executed.</param>
public Command(Action<object> execute, Func<object, bool> canExecute) : this(execute)
{
if (canExecute == null)
_canExecute = canExecute;
}
+ /// <summary>
+ /// Initializes a new instance of the Command class.
+ /// </summary>
+ /// <param name="execute">An Action to execute when the Command is executed.</param>
+ /// <param name="canExecute">A instance indicating if the Command can be executed.</param>
public Command(Action execute, Func<bool> canExecute) : this(o => execute(), o => canExecute())
{
if (execute == null)
throw new ArgumentNullException(nameof(canExecute));
}
+ /// <summary>
+ /// Returns a Boolean indicating if the Command can be exectued with the given parameter.
+ /// </summary>
+ /// <param name="parameter">An Object used as parameter to determine if the Command can be executed.</param>
+ /// <returns>true if the Command can be executed, false otherwise.</returns>
public bool CanExecute(object parameter)
{
if (_canExecute != null)
return true;
}
+ /// <summary>
+ /// Occurs when the target of the Command should reevaluate whether or not the Command can be executed.
+ /// </summary>
public event EventHandler CanExecuteChanged;
- public void Execute(object parameter)
+ /// <summary>
+ /// Invokes the execute Action.
+ /// </summary>
+ /// <param name="parameter">An Object used as parameter for the execute Action.</param>
+ public void Execute(object parameter)
{
_execute(parameter);
}
+ /// <summary>
+ /// Send a CanExecuteChanged.
+ /// </summary>
public void ChangeCanExecute()
{
EventHandler changed = CanExecuteChanged;
public class ContentPage : TemplatedPage
{
private View _content;
- private Window Window;
// public static readonly BindableProperty ContentProperty = BindableProperty.Create(nameof(Content), typeof(View), typeof(ContentPage), null, propertyChanged: TemplateUtilities.OnContentChanged);
// set { SetValue(ContentProperty, value); }
// }
+ /// <summary>
+ /// Method that is called when the binding content changes.
+ /// </summary>
protected override void OnBindingContextChanged()
{
base.OnBindingContextChanged();
private EventHandler _clearEventHandler;
+ /// <summary>
+ /// Clear event.
+ /// </summary>
public event EventHandler ClearEvent
{
add
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// Template that specifies a group of styles and effects for controls.
+ /// </summary>
public class ControlTemplate : ElementTemplate
{
+ /// <summary>
+ /// For internal use only.
+ /// </summary>
public ControlTemplate()
{
}
- public ControlTemplate(Type type) : base(type)
+ /// <summary>
+ /// Creates a new control template for the specified control type.
+ /// </summary>
+ /// <param name="type">The type of control for which to create a template.</param>
+ public ControlTemplate(Type type) : base(type)
{
}
}
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// A collection of styles and properties that can be added to an element at run time.
+ /// </summary>
public abstract class Effect
{
internal Effect()
{
}
+ /// <summary>
+ /// Gets the element to which the style is attached.
+ /// </summary>
public Element Element { get; internal set; }
+ /// <summary>
+ /// Gets a value that tells whether the effect is attached to an element.
+ /// </summary>
public bool IsAttached { get; private set; }
+ /// <summary>
+ /// Gets the ID that is used to resolve this effect at runtime.
+ /// </summary>
public string ResolveId { get; internal set; }
- #region Statics
-
- public static Effect Resolve(string name)
+ #region Statics
+ /// <summary>
+ /// Returns an Effect for the specified name, which is of the form ResolutionGroupName.ExportEffect.
+ /// </summary>
+ /// <param name="name">The name of the effect to get.</param>
+ /// <returns>The uniquely identified effect.</returns>
+ public static Effect Resolve(string name)
{
Effect result = null;
if (Tizen.NUI.Internals.Registrar.Effects.TryGetValue(name, out Type effectType))
return result;
}
- #endregion
+ #endregion
- // Received after Control/Container/Element made valid
+ /// <summary>
+ /// Method that is called after the effect is attached and made valid.
+ /// </summary>
protected abstract void OnAttached();
- // Received after Control/Container made invalid
+ /// <summary>
+ /// Method that is called after the effect is detached and invalidated.
+ /// </summary>
protected abstract void OnDetached();
internal virtual void ClearEffect()
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// Provides the base class for all Tizen.NUI.Binding hierarchal elements. This class contains all the methods and properties required to represent an element in the Tizen.NUI.Binding hierarchy.
+ /// </summary>
public abstract partial class Element : BindableObject, IElement, INameScope, IElementController
{
internal static readonly ReadOnlyCollection<Element> EmptyChildren = new ReadOnlyCollection<Element>(new Element[0]);
+ /// <summary>
+ /// Identifies the ClassId bindable property.
+ /// </summary>
public static readonly BindableProperty ClassIdProperty = BindableProperty.Create("ClassId", typeof(string), typeof(Tizen.NUI.BaseComponents.View), null);
string _automationId;
string _styleId;
+ /// <summary>
+ /// Gets or sets a value that allows the automation framework to find and interact with this element.
+ /// </summary>
public string AutomationId
{
get { return _automationId; }
}
}
+ /// <summary>
+ /// Gets or sets a value used to identify a collection of semantically similar elements.
+ /// </summary>
public string ClassId
{
get { return (string)GetValue(ClassIdProperty); }
}
}
+ /// <summary>
+ /// Gets a value that can be used to uniquely identify an element through the run of an application.
+ /// </summary>
public Guid Id
{
get
}
}
+ /// <summary>
+ /// Gets the element which is the closest ancestor of this element that is a BaseHandle.
+ /// </summary>
[Obsolete("ParentView is obsolete as of version 2.1.0. Please use Parent instead.")]
public /*VisualElement*/BaseHandle ParentView
{
}
}
+ /// <summary>
+ /// Gets or sets a user defined value to uniquely identify the element.
+ /// </summary>
public string StyleId
{
get { return _styleId; }
internal virtual ReadOnlyCollection<Element> LogicalChildrenInternal => EmptyChildren;
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public ReadOnlyCollection<Element> LogicalChildren => LogicalChildrenInternal;
}
}
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public IPlatform Platform
{
}
}
- // you're not my real dad
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// For internal use.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
public Element RealParent { get; private set; }
Dictionary<BindableProperty, string> DynamicResources
_changeHandlers.Add(onchanged);
}
+ /// <summary>
+ /// Gets or sets the parent element of the element.
+ /// </summary>
public Element Parent
{
get { return _parentOverride ?? RealParent; }
_changeHandlers.Remove(onchanged);
}
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public IEffectControlProvider EffectControlProvider
{
}
void IElementController.SetValueFromRenderer(BindableProperty property, object value) => SetValueFromRenderer(property, value);
+
+ /// <summary>
+ /// Sets the value of the specified property.
+ /// </summary>
+ /// <param name="property">The BindableProperty on which to assign a value.</param>
+ /// <param name="value">The value to set.</param>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetValueFromRenderer(BindableProperty property, object value)
{
SetValueCore(property, value);
}
+ /// <summary>
+ /// Sets the value of the propertyKey.
+ /// </summary>
+ /// <param name="property">The BindablePropertyKey on which to assign a value.</param>
+ /// <param name="value">The value to set.</param>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SetValueFromRenderer(BindablePropertyKey property, object value)
{
SetValueCore(property, value);
}
+ /// <summary>
+ /// For internal use.
+ /// </summary>
+ /// <param name="name">The nameof the effect</param>
+ /// <returns>true if attached</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool EffectIsAttached(string name)
{
internal event EventHandler<ElementEventArgs> DescendantRemoved;
+ /// <summary>
+ /// Removes a previously set dynamic resource.
+ /// </summary>
+ /// <param name="property">The BindableProperty from which to remove the DynamicResource.</param>
public new void RemoveDynamicResource(BindableProperty property)
{
base.RemoveDynamicResource(property);
}
+ /// <summary>
+ /// Sets the BindableProperty property of this element to be updated via the DynamicResource with the provided key.
+ /// </summary>
+ /// <param name="property">The BindableProperty.</param>
+ /// <param name="key">The key of the DynamicResource</param>
public new void SetDynamicResource(BindableProperty property, string key)
{
base.SetDynamicResource(property, key);
}
+ /// <summary>
+ /// Invoked whenever the binding context of the element changes. Implement this method to add class handling for this event.
+ /// </summary>
protected override void OnBindingContextChanged()
{
var gotBindingContext = false;
base.OnBindingContextChanged();
}
- protected virtual void OnChildAdded(Element child)
+ /// <summary>
+ /// Invoked whenever the ChildAdded event needs to be emitted.Implement this method to add class handling for this event.
+ /// </summary>
+ /// <param name="child">The element that was added.</param>
+ protected virtual void OnChildAdded(Element child)
{
child.Parent = this;
if (Platform != null)
OnDescendantAdded(element);
}
- protected virtual void OnChildRemoved(Element child)
+ /// <summary>
+ /// Invoked whenever the ChildRemoved event needs to be emitted.Implement this method to add class handling for this event.
+ /// </summary>
+ /// <param name="child">The element that was removed.</param>
+ protected virtual void OnChildRemoved(Element child)
{
child.Parent = null;
OnDescendantRemoved(element);
}
+ /// <summary>
+ /// Invoked whenever the Parent of an element is set.Implement this method in order to add behavior when the element is added to a parent.
+ /// </summary>
protected virtual void OnParentSet()
{
ParentSet?.Invoke(this, EventArgs.Empty);
// ApplyStyleSheetsOnParentSet();
}
+ /// <summary>
+ /// Method that is called when a bound property is changed.
+ /// </summary>
+ /// <param name="propertyName">The name of the bound property that changed.</param>
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
base.OnPropertyChanged(propertyName);
}
}
+ /// <summary>
+ /// For internal use.
+ /// </summary>
+ /// <returns>the elements</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public IEnumerable<Element> Descendants()
{
// }
}
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler PlatformSet;
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// Base class for DataTemplate and ControlTemplate classes.
+ /// </summary>
public class ElementTemplate : IElement, IDataTemplate
{
List<Action<object, ResourcesChangedEventArgs>> _changeHandlers;
_changeHandlers.Remove(onchanged);
}
- public object CreateContent()
+ /// <summary>
+ /// Used by the XAML infrastructure to load data templates and set up the content of the resulting UI.
+ /// </summary>
+ /// <returns></returns>
+ public object CreateContent()
{
if (LoadTemplate == null)
throw new InvalidOperationException("LoadTemplate should not be null");
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// This interface is for internal use by platform renderers.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
public interface IConfigElement<out T> where T : Element
{
+ /// <summary>
+ /// For internal use
+ /// </summary>
T Element { get; }
}
}
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// Base interface for marker classes that identify target platforms for platform specific effects.
+ /// </summary>
public interface IConfigPlatform { }
}
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// When implemented in a renderer, registers a platform-specific effect on an element.
+ /// </summary>
public interface IEffectControlProvider
{
+ /// <summary>
+ /// Registers the effect with the element by establishing the parent-child relations needed for rendering on the specific platform.
+ /// </summary>
+ /// <param name="effect">The effect to register.</param>
void RegisterEffect(Effect effect);
}
}
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// Interface abstracting platform-specific navigation.
+ /// </summary>
public interface INavigation
{
- IReadOnlyList<Page> ModalStack { get; }
+ /// <summary>
+ /// Gets the modal navigation stack.
+ /// </summary>
+ IReadOnlyList<Page> ModalStack { get; }
+ /// <summary>
+ /// Gets the stack of pages in the navigation.
+ /// </summary>
IReadOnlyList<Page> NavigationStack { get; }
+ /// <summary>
+ /// Inserts a page in the navigation stack before an existing page in the stack.
+ /// </summary>
+ /// <param name="page">The page to add.</param>
+ /// <param name="before">The existing page, before which page will be inserted.</param>
void InsertPageBefore(Page page, Page before);
+
+ /// <summary>
+ /// Asynchronously removes the most recent Page from the navigation stack.
+ /// </summary>
+ /// <returns>The Page that had been at the top of the navigation stack.</returns>
Task<Page> PopAsync();
+
+ /// <summary>
+ /// Asynchronously removes the most recent Page from the navigation stack, with optional animation.
+ /// </summary>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>The Page that had been at the top of the navigation stack.</returns>
Task<Page> PopAsync(bool animated);
+
+ /// <summary>
+ /// Asynchronously dismisses the most recent modally presented Page.
+ /// </summary>
+ /// <returns>An awaitable instance, indicating the PopModalAsync completion. The Task.Result is the Page that has been popped.</returns>
Task<Page> PopModalAsync();
+
+ /// <summary>
+ /// Asynchronously dismisses the most recent modally presented Page, with optional animation.
+ /// </summary>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>An awaitable, indicating the PopModalAsync completion. The Task.Result is the Page that has been popped.</returns>
Task<Page> PopModalAsync(bool animated);
+
+ /// <summary>
+ /// Pops all but the root Page off the navigation stack.
+ /// </summary>
+ /// <returns>A task representing the asynchronous dismiss operation.</returns>
Task PopToRootAsync();
+
+ /// <summary>
+ /// Pops all but the root Page off the navigation stack, with optional animation.
+ /// </summary>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>A task representing the asynchronous dismiss operation.</returns>
Task PopToRootAsync(bool animated);
+ /// <summary>
+ /// Asynchronously adds a Page to the top of the navigation stack.
+ /// </summary>
+ /// <param name="page">The Page to be pushed on top of the navigation stack.</param>
+ /// <returns>A task that represents the asynchronous push operation.</returns>
Task PushAsync(Page page);
+ /// <summary>
+ /// Asynchronously adds a Page to the top of the navigation stack, with optional animation.
+ /// </summary>
+ /// <param name="page">The page to push.</param>
+ /// <param name="animated">Whether to animate the push.</param>
+ /// <returns>A task that represents the asynchronous push operation.</returns>
Task PushAsync(Page page, bool animated);
+
+ /// <summary>
+ /// Presents a Page modally.
+ /// </summary>
+ /// <param name="page">The Page to present modally.</param>
+ /// <returns>An awaitable Task, indicating the PushModal completion.</returns>
Task PushModalAsync(Page page);
+
+ /// <summary>
+ /// Presents a Page modally, with optional animation.
+ /// </summary>
+ /// <param name="page">The page to push.</param>
+ /// <param name="animated">Whether to animate the push.</param>
+ /// <returns>An awaitable Task, indicating the PushModal completion.</returns>
Task PushModalAsync(Page page, bool animated);
+ /// <summary>
+ /// Removes the specified page from the navigation stack.
+ /// </summary>
+ /// <param name="page">The page to remove.</param>
void RemovePage(Page page);
}
}
\ No newline at end of file
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public interface IPlatform
{
+ /// <summary>
+ /// Returns the native size.
+ /// </summary>
+ /// <param name="view">The view</param>
+ /// <param name="widthConstraint">The width constraint.</param>
+ /// <param name="heightConstraint">The height constraint.</param>
+ /// <returns>The native size.</returns>
SizeRequest GetNativeSize(BaseHandle view, double widthConstraint, double heightConstraint);
}
}
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// Marker interface for returning platform-specific configuration elements.
+ /// </summary>
+ /// <typeparam name="TPlatform">The platform type.</typeparam>
+ /// <typeparam name="TElement">The element type.</typeparam>
public interface IPlatformElementConfiguration<out TPlatform, out TElement> : IConfigElement<TElement>
where TPlatform : IConfigPlatform
where TElement : Element
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// EventArgs for the NavigationPage's navigation events.
+ /// </summary>
public class NavigationEventArgs : EventArgs
{
+ /// <summary>
+ /// Create a NavigationEventArgs instance.
+ /// </summary>
+ /// <param name="page">The page that was popped or is newly visible.</param>
public NavigationEventArgs(Page page)
{
if (page == null)
Page = page;
}
+ /// <summary>
+ /// Gets the page that was removed or is newly visible.
+ /// </summary>
public Page Page { get; private set; }
}
}
\ No newline at end of file
namespace Tizen.NUI
{
- // [RenderWith(typeof(_NavigationPageRenderer))]
- public class NavigationPage : Page, IPageContainer<Page>, INavigationPageController, IElementConfiguration<NavigationPage>
+ /// <summary>
+ /// A Page that manages the navigation and user-experience of a stack of other pages.
+ /// </summary>
+ // [RenderWith(typeof(_NavigationPageRenderer))]
+ public class NavigationPage : Page, IPageContainer<Page>, INavigationPageController, IElementConfiguration<NavigationPage>
{
+ /// <summary>
+ /// Identifies the property associated with the title of the back button.
+ /// </summary>
public static readonly BindableProperty BackButtonTitleProperty = BindableProperty.CreateAttached("BackButtonTitle", typeof(string), typeof(Page), null);
+ /// <summary>
+ /// Backing store for the HasNavigationBar property.
+ /// </summary>
public static readonly BindableProperty HasNavigationBarProperty = BindableProperty.CreateAttached("HasNavigationBar", typeof(bool), typeof(Page), true);
+ /// <summary>
+ /// Backing store for the HasBackButton property.
+ /// </summary>
public static readonly BindableProperty HasBackButtonProperty = BindableProperty.CreateAttached("HasBackButton", typeof(bool), typeof(NavigationPage), true);
+ /// <summary>
+ /// Identifies the Tint bindable property.
+ /// </summary>
[Obsolete("TintProperty is obsolete as of version 1.2.0. Please use BarBackgroundColorProperty and BarTextColorProperty to change NavigationPage bar color properties.")]
public static readonly BindableProperty TintProperty = BindableProperty.Create("Tint", typeof(Color), typeof(NavigationPage), /*Color.Default*/Color.Black);
+ /// <summary>
+ /// Identifies the property associated with the color of the NavigationPage's bar background color.
+ /// </summary>
public static readonly BindableProperty BarBackgroundColorProperty = BindableProperty.Create("BarBackgroundColor", typeof(Color), typeof(NavigationPage), /*Color.Default*/Color.Black);
+ /// <summary>
+ /// Identifies the property associated with the color of the NavigationPage's bar text color.
+ /// </summary>
public static readonly BindableProperty BarTextColorProperty = BindableProperty.Create("BarTextColor", typeof(Color), typeof(NavigationPage), /*Color.Default*/Color.Black);
+ /// <summary>
+ /// Indicates the NavigationPage.SetTitleIcon/NavigationPage.GetTitleIcon property.
+ /// </summary>
public static readonly BindableProperty TitleIconProperty = BindableProperty.CreateAttached("TitleIcon", typeof(FileImageSource), typeof(NavigationPage), default(FileImageSource));
static readonly BindablePropertyKey CurrentPagePropertyKey = BindableProperty.CreateReadOnly("CurrentPage", typeof(Page), typeof(NavigationPage), null);
- public static readonly BindableProperty CurrentPageProperty = CurrentPagePropertyKey.BindableProperty;
- static readonly BindablePropertyKey RootPagePropertyKey = BindableProperty.CreateReadOnly(nameof(RootPage), typeof(Page), typeof(NavigationPage), null);
- public static readonly BindableProperty RootPageProperty = RootPagePropertyKey.BindableProperty;
+ /// <summary>
+ /// Identifies the property associated with NavigationPage.CurrentPage
+ /// </summary>
+ public static readonly BindableProperty CurrentPageProperty = CurrentPagePropertyKey.BindableProperty;
+ static readonly BindablePropertyKey RootPagePropertyKey = BindableProperty.CreateReadOnly(nameof(RootPage), typeof(Page), typeof(NavigationPage), null);
+ /// <summary>
+ /// Identifies the property associated with NavigationPage.RootPage
+ /// </summary>
+ public static readonly BindableProperty RootPageProperty = RootPagePropertyKey.BindableProperty;
+
+ /// <summary>
+ /// Initializes a new NavigationPage object.
+ /// </summary>
public NavigationPage()
{
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<NavigationPage>>(() => new PlatformConfigurationRegistry<NavigationPage>(this));
Navigation = new NavigationImpl(this);
}
+ /// <summary>
+ /// Creates a new NavigationPage element with root as its root element.
+ /// </summary>
+ /// <param name="root">The root page.</param>
public NavigationPage(Page root) : this()
{
PushPage(root);
}
+ /// <summary>
+ /// Gets or sets the background color for the bar at the top of the NavigationPage.
+ /// </summary>
public Color BarBackgroundColor
{
get { return (Color)GetValue(BarBackgroundColorProperty); }
set { SetValue(BarBackgroundColorProperty, value); }
}
+ /// <summary>
+ /// Gets or sets the text that appears on the bar at the top of the NavigationPage.
+ /// </summary>
public Color BarTextColor
{
get { return (Color)GetValue(BarTextColorProperty); }
set { SetValue(BarTextColorProperty, value); }
}
+ /// <summary>
+ /// The color to be used as the Tint of the NavigationPage.
+ /// </summary>
[Obsolete("Tint is obsolete as of version 1.2.0. Please use BarBackgroundColor and BarTextColor to change NavigationPage bar color properties.")]
public Color Tint
{
internal Task CurrentNavigationTask { get; set; }
+ /// <summary>
+ /// For internal use
+ /// </summary>
+ /// <param name="depth">The depth</param>
+ /// <returns>The page instance</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public Page Peek(int depth)
{
return (Page)InternalChildren[InternalChildren.Count - depth - 1];
}
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public IEnumerable<Page> Pages => InternalChildren.Cast<Page>();
+ /// <summary>
+ /// For internal use
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public int StackDepth
{
get { return InternalChildren.Count; }
}
+ /// <summary>
+ /// The Page that is currently top-most on the navigation stack.
+ /// </summary>
public Page CurrentPage
{
get { return (Page)GetValue(CurrentPageProperty); }
private set { SetValue(CurrentPagePropertyKey, value); }
}
+ /// <summary>
+ /// The Page that is the root of the navigation stack.
+ /// </summary>
public Page RootPage
{
get { return (Page)GetValue(RootPageProperty); }
private set { SetValue(RootPagePropertyKey, value); }
}
+ /// <summary>
+ /// The title of the back button for the specified page.
+ /// </summary>
+ /// <param name="page">The Page whose back-button's title is being requested.</param>
+ /// <returns>The title of the back button that would be shown if the specified page were the Xamarin.Forms.CurrentPage.</returns>
public static string GetBackButtonTitle(BindableObject page)
{
return (string)page.GetValue(BackButtonTitleProperty);
}
+ /// <summary>
+ /// Returns a value that indicates whether page has a back button.
+ /// </summary>
+ /// <param name="page">The page to be checked</param>
+ /// <returns>true if the page has a back button.</returns>
public static bool GetHasBackButton(Page page)
{
if (page == null)
return (bool)page.GetValue(HasBackButtonProperty);
}
+ /// <summary>
+ /// Returns a value that indicates whether the page has a navigation bar.
+ /// </summary>
+ /// <param name="page">The Page being queried.</param>
+ /// <returns>true if page would display a navigation bar were it the CurrentPage.</returns>
public static bool GetHasNavigationBar(BindableObject page)
{
return (bool)page.GetValue(HasNavigationBarProperty);
return (FileImageSource)bindable.GetValue(TitleIconProperty);
}
+ /// <summary>
+ /// Asynchronously removes the top Page from the navigation stack.
+ /// </summary>
+ /// <returns>The Page that had been at the top of the navigation stack.</returns>
public Task<Page> PopAsync()
{
return PopAsync(true);
}
+ /// <summary>
+ /// Asynchronously removes the top Page from the navigation stack, with optional animation.
+ /// </summary>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>The Page that had been at the top of the navigation stack.</returns>
public async Task<Page> PopAsync(bool animated)
{
var tcs = new TaskCompletionSource<bool>();
return result;
}
+ /// <summary>
+ /// Event that is raised after a page is popped from this NavigationPage element.
+ /// </summary>
public event EventHandler<NavigationEventArgs> Popped;
+ /// <summary>
+ /// Event that is raised when the last nonroot element is popped from this NavigationPage element.
+ /// </summary>
public event EventHandler<NavigationEventArgs> PoppedToRoot;
+ /// <summary>
+ /// Pops all but the root Page off the navigation stack.
+ /// </summary>
+ /// <returns>A task that represents the asynchronous dismiss operation.</returns>
public Task PopToRootAsync()
{
return PopToRootAsync(true);
}
+ /// <summary>
+ /// A task for asynchronously popping all pages off of the navigation stack.
+ /// </summary>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>A task that represents the asynchronous dismiss operation.</returns>
public async Task PopToRootAsync(bool animated)
{
if (CurrentNavigationTask != null && !CurrentNavigationTask.IsCompleted)
await result;
}
+ /// <summary>
+ /// Presents a Page modally.
+ /// </summary>
+ /// <param name="page">The Page to present modally.</param>
+ /// <returns>An awaitable Task, indicating the PushModal completion.</returns>
public Task PushAsync(Page page)
{
return PushAsync(page, true);
}
+ /// <summary>
+ /// A task for asynchronously pushing a page onto the navigation stack, with optional animation.
+ /// </summary>
+ /// <param name="page">The Page to present modally.</param>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>An awaitable Task, indicating the PushModal completion.</returns>
public async Task PushAsync(Page page, bool animated)
{
if (CurrentNavigationTask != null && !CurrentNavigationTask.IsCompleted)
await CurrentNavigationTask;
}
+ /// <summary>
+ /// Event that is raised when a page is pushed onto this NavigationPage element.
+ /// </summary>
public event EventHandler<NavigationEventArgs> Pushed;
+ /// <summary>
+ /// Sets the title that appears on the back button for page.
+ /// </summary>
+ /// <param name="page">The BindableObject object.</param>
+ /// <param name="value">The value to set.</param>
public static void SetBackButtonTitle(BindableObject page, string value)
{
page.SetValue(BackButtonTitleProperty, value);
}
+ /// <summary>
+ /// Adds or removes a back button to page, with optional animation.
+ /// </summary>
+ /// <param name="page">The page object.</param>
+ /// <param name="value">The value to set.</param>
public static void SetHasBackButton(Page page, bool value)
{
if (page == null)
page.SetValue(HasBackButtonProperty, value);
}
+ /// <summary>
+ /// Sets a value that indicates whether or not this NavigationPage element has a navigation bar.
+ /// </summary>
+ /// <param name="page">The BindableObject object</param>
+ /// <param name="value">The value to set</param>
public static void SetHasNavigationBar(BindableObject page, bool value)
{
page.SetValue(HasNavigationBarProperty, value);
bindable.SetValue(TitleIconProperty, value);
}
+ /// <summary>
+ /// Event that is raised when the hardware back button is pressed.
+ /// </summary>
+ /// <returns>true if consumed</returns>
protected override bool OnBackButtonPressed()
{
if (CurrentPage.SendBackButtonPressed())
return base.OnBackButtonPressed();
}
+ /// <summary>
+ /// For internal use
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler<NavigationRequestedEventArgs> InsertPageBeforeRequested;
+ /// <summary>
+ /// For internal use
+ /// </summary>
+ /// <param name="animated">Whether animate the pop.</param>
+ /// <param name="fast"></param>
+ /// <returns>A task that represents the asynchronous dismiss operation.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public async Task<Page> PopAsyncInner(bool animated, bool fast)
{
return page;
}
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler<NavigationRequestedEventArgs> PopRequested;
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler<NavigationRequestedEventArgs> PopToRootRequested;
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler<NavigationRequestedEventArgs> PushRequested;
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler<NavigationRequestedEventArgs> RemovePageRequested;
readonly Lazy<PlatformConfigurationRegistry<NavigationPage>> _platformConfigurationRegistry;
+ /// <summary>
+ /// Returns the platform-specific instance of this NavigationPage, on which a platform-specific method may be called.
+ /// </summary>
+ /// <typeparam name="T">The platform for which to return an instance.</typeparam>
+ /// <returns>The platform-specific instance of this NavigationPage</returns>
public new IPlatformElementConfiguration<T, NavigationPage> On<T>() where T : IConfigPlatform
{
return _platformConfigurationRegistry.Value.On<T>();
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public class NavigationProxy : INavigation
{
}
}
- public void InsertPageBefore(Page page, Page before)
+ /// <summary>
+ /// Inserts a page in the navigation stack before an existing page in the stack.
+ /// </summary>
+ /// <param name="page">The page to add.</param>
+ /// <param name="before">The existing page, before which page will be inserted.</param>
+ public void InsertPageBefore(Page page, Page before)
{
OnInsertPageBefore(page, before);
}
- public IReadOnlyList<Page> ModalStack
+ /// <summary>
+ /// Gets the modal navigation stack.
+ /// </summary>
+ public IReadOnlyList<Page> ModalStack
{
get { return GetModalStack(); }
}
- public IReadOnlyList<Page> NavigationStack
+ /// <summary>
+ /// Gets the stack of pages in the navigation.
+ /// </summary>
+ public IReadOnlyList<Page> NavigationStack
{
get { return GetNavigationStack(); }
}
- public Task<Page> PopAsync()
+ /// <summary>
+ /// Asynchronously removes the most recent Page from the navigation stack.
+ /// </summary>
+ /// <returns>The Page that had been at the top of the navigation stack.</returns>
+ public Task<Page> PopAsync()
{
return OnPopAsync(true);
}
- public Task<Page> PopAsync(bool animated)
+ /// <summary>
+ /// Asynchronously removes the top Page from the navigation stack, with optional animation.
+ /// </summary>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>The Page that had been at the top of the navigation stack.</returns>
+ public Task<Page> PopAsync(bool animated)
{
return OnPopAsync(animated);
}
+ /// <summary>
+ /// Asynchronously dismisses the most recent modally presented Page.
+ /// </summary>
+ /// <returns>An awaitable instance, indicating the PopModalAsync completion. The Task.Result is the Page that has been popped.</returns>
public Task<Page> PopModalAsync()
{
return OnPopModal(true);
}
- public Task<Page> PopModalAsync(bool animated)
+ /// <summary>
+ /// Asynchronously removes the top Page from the navigation stack, with optional animation.
+ /// </summary>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>The Page that had been at the top of the navigation stack.</returns>
+ public Task<Page> PopModalAsync(bool animated)
{
return OnPopModal(animated);
}
- public Task PopToRootAsync()
+ /// <summary>
+ /// Pops all but the root Page off the navigation stack.
+ /// </summary>
+ /// <returns>A task representing the asynchronous dismiss operation.</returns>
+ public Task PopToRootAsync()
{
return OnPopToRootAsync(true);
}
+ /// <summary>
+ /// Pops all but the root Page off the navigation stack, with optional animation.
+ /// </summary>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>A task representing the asynchronous dismiss operation.</returns>
public Task PopToRootAsync(bool animated)
{
return OnPopToRootAsync(animated);
}
- public Task PushAsync(Page root)
+ /// <summary>
+ /// Asynchronously adds a Page to the top of the navigation stack.
+ /// </summary>
+ /// <param name="root">The Page to be pushed on top of the navigation stack.</param>
+ /// <returns>A task that represents the asynchronous push operation.</returns>
+ public Task PushAsync(Page root)
{
return PushAsync(root, true);
}
+ /// <summary>
+ /// Asynchronously adds a Page to the top of the navigation stack, with optional animation.
+ /// </summary>
+ /// <param name="root">The page to push.</param>
+ /// <param name="animated">Whether to animate the push.</param>
+ /// <returns>A task that represents the asynchronous push operation.</returns>
public Task PushAsync(Page root, bool animated)
{
if (root.RealParent != null)
return OnPushAsync(root, animated);
}
- public Task PushModalAsync(Page modal)
+ /// <summary>
+ /// Presents a Page modally.
+ /// </summary>
+ /// <param name="modal">The Page to present modally.</param>
+ /// <returns>An awaitable Task, indicating the PushModal completion.</returns>
+ public Task PushModalAsync(Page modal)
{
return PushModalAsync(modal, true);
}
- public Task PushModalAsync(Page modal, bool animated)
+ /// <summary>
+ /// Presents a Page modally, with optional animation.
+ /// </summary>
+ /// <param name="modal">The page to push.</param>
+ /// <param name="animated">Whether to animate the push.</param>
+ /// <returns>An awaitable Task, indicating the PushModal completion.</returns>
+ public Task PushModalAsync(Page modal, bool animated)
{
if (modal.RealParent != null)
throw new InvalidOperationException("Page must not already have a parent.");
return OnPushModal(modal, animated);
}
- public void RemovePage(Page page)
+ /// <summary>
+ /// Removes the specified page from the navigation stack.
+ /// </summary>
+ /// <param name="page">The page to remove.</param>
+ public void RemovePage(Page page)
{
OnRemovePage(page);
}
+ /// <summary>
+ /// For internal use. Returns the modal navigation stack.
+ /// </summary>
+ /// <returns>The modal navigation stack.</returns>
protected virtual IReadOnlyList<Page> GetModalStack()
{
INavigation currentInner = Inner;
return currentInner == null ? _modalStack.Value : currentInner.ModalStack;
}
+ /// <summary>
+ /// For internal use. Returns the stack of pages in the navigation.
+ /// </summary>
+ /// <returns>The stack of pages in the navigation.</returns>
protected virtual IReadOnlyList<Page> GetNavigationStack()
{
INavigation currentInner = Inner;
return currentInner == null ? _pushStack.Value : currentInner.NavigationStack;
}
+ /// <summary>
+ /// The method called when insert a page in the navigation stack before an existing page in the stack.
+ /// </summary>
+ /// <param name="page">The page to add.</param>
+ /// <param name="before">The existing page, before which page will be inserted.</param>
protected virtual void OnInsertPageBefore(Page page, Page before)
{
INavigation currentInner = Inner;
}
}
+ /// <summary>
+ /// This method calls when removes the top Page from the navigation stack
+ /// </summary>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns></returns>
protected virtual Task<Page> OnPopAsync(bool animated)
{
INavigation inner = Inner;
return inner == null ? Task.FromResult(Pop()) : inner.PopAsync(animated);
}
+ /// <summary>
+ /// This method calls when removes the top Page from the navigation stack
+ /// </summary>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>An awaitable instance, indicating the PopModalAsync completion</returns>
protected virtual Task<Page> OnPopModal(bool animated)
{
INavigation innerNav = Inner;
return innerNav == null ? Task.FromResult(PopModal()) : innerNav.PopModalAsync(animated);
}
+ /// <summary>
+ /// This method calls when Pops all but the root Page off the navigation stack.
+ /// </summary>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>A task representing the asynchronous dismiss operation.</returns>
protected virtual Task OnPopToRootAsync(bool animated)
{
INavigation currentInner = Inner;
return currentInner.PopToRootAsync(animated);
}
+ /// <summary>
+ /// This method calls when adds a Page to the top of the navigation stack, with optional animation.
+ /// </summary>
+ /// <param name="page">The page to add</param>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>A task that represents the asynchronous push operation.</returns>
protected virtual Task OnPushAsync(Page page, bool animated)
{
INavigation currentInner = Inner;
return currentInner.PushAsync(page, animated);
}
+ /// <summary>
+ /// This method calls when Presents a Page modally, with optional animation.
+ /// </summary>
+ /// <param name="modal">The page to push.</param>
+ /// <param name="animated">Whether to animate the pop.</param>
+ /// <returns>An awaitable Task, indicating the PushModal completion.</returns>
protected virtual Task OnPushModal(Page modal, bool animated)
{
INavigation currentInner = Inner;
return currentInner.PushModalAsync(modal, animated);
}
+ /// <summary>
+ /// This method calls when Removes the specified page from the navigation stack.
+ /// </summary>
+ /// <param name="page">The page to add.</param>
protected virtual void OnRemovePage(Page page)
{
INavigation currentInner = Inner;
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public class NavigationRequestedEventArgs : NavigationEventArgs
{
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="page"></param>
+ /// <param name="animated"></param>
+ /// <param name="realize"></param>
public NavigationRequestedEventArgs(Page page, bool animated, bool realize = true) : base(page)
{
Animated = animated;
Realize = realize;
}
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="page"></param>
+ /// <param name="before"></param>
+ /// <param name="animated"></param>
public NavigationRequestedEventArgs(Page page, Page before, bool animated) : this(page, animated)
{
BeforePage = before;
}
+ /// <summary>
+ /// Gets or Sets the whether animate.
+ /// </summary>
public bool Animated { get; set; }
+ /// <summary>
+ /// Gets or Sets the before page.
+ /// </summary>
public Page BeforePage { get; set; }
+ /// <summary>
+ /// Gets or Sets the realize.
+ /// </summary>
public bool Realize { get; set; }
+ /// <summary>
+ /// Gets or Sets the Task.
+ /// </summary>
public Task<bool> Task { get; set; }
}
}
\ No newline at end of file
namespace Tizen.NUI
{
- // [RenderWith(typeof(_PageRenderer))]
- public class Page : /*VisualElement*/BaseHandle, ILayout, IPageController, IElementConfiguration<Page>, IPaddingElement
+ /// <summary>
+ /// A BaseHandle that occupies the entire screen.
+ /// </summary>
+ // [RenderWith(typeof(_PageRenderer))]
+ public class Page : /*VisualElement*/BaseHandle, ILayout, IPageController, IElementConfiguration<Page>, IPaddingElement
{
+ /// <summary>
+ /// For internal use.
+ /// </summary>
public const string BusySetSignalName = "Xamarin.BusySet";
+ /// <summary>
+ /// For internal use.
+ /// </summary>
public const string AlertSignalName = "Xamarin.SendAlert";
+ /// <summary>
+ /// For internal use.
+ /// </summary>
public const string ActionSheetSignalName = "Xamarin.ShowActionSheet";
internal static readonly BindableProperty IgnoresContainerAreaProperty = BindableProperty.Create("IgnoresContainerArea", typeof(bool), typeof(Page), false);
+ /// <summary>
+ /// Identifies the BackgroundImage property.
+ /// </summary>
public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(Page), default(string));
+ /// <summary>
+ /// Identifies the IsBusy property.
+ /// </summary>
public static readonly BindableProperty IsBusyProperty = BindableProperty.Create("IsBusy", typeof(bool), typeof(Page), false, propertyChanged: (bo, o, n) => ((Page)bo).OnPageBusyChanged());
+ /// <summary>
+ /// Identifies the Padding property.
+ /// </summary>
public static readonly BindableProperty PaddingProperty = PaddingElement.PaddingProperty;
+ /// <summary>
+ /// Identifies the Title property.
+ /// </summary>
public static readonly BindableProperty TitleProperty = BindableProperty.Create("Title", typeof(string), typeof(Page), null);
+ /// <summary>
+ /// Identifies the Icon property.
+ /// </summary>
public static readonly BindableProperty IconProperty = BindableProperty.Create("Icon", typeof(FileImageSource), typeof(Page), default(FileImageSource));
readonly Lazy<PlatformConfigurationRegistry<Page>> _platformConfigurationRegistry;
ReadOnlyCollection<Element> _logicalChildren;
+ /// <summary>
+ /// Creates a new Page element with default values.
+ /// </summary>
public Page()
{
var toolbarItems = new ObservableCollection<ToolbarItem>();
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Page>>(() => new PlatformConfigurationRegistry<Page>(this));
}
+ /// <summary>
+ /// Identifies the image used as a background for the Page.
+ /// </summary>
public string BackgroundImage
{
get { return (string)GetValue(BackgroundImageProperty); }
set { SetValue(IconProperty, value); }
}
+ /// <summary>
+ /// Marks the Page as busy. This will cause the platform specific global activity indicator to show a busy state.
+ /// </summary>
public bool IsBusy
{
get { return (bool)GetValue(IsBusyProperty); }
set { SetValue(IsBusyProperty, value); }
}
+ /// <summary>
+ /// The space between the content of the Page and it's border.
+ /// </summary>
public Thickness Padding
{
get { return (Thickness)GetValue(PaddingElement.PaddingProperty); }
UpdateChildrenLayout();
}
+ /// <summary>
+ /// The Page's title.
+ /// </summary>
public string Title
{
get { return (string)GetValue(TitleProperty); }
internal IList<ToolbarItem> ToolbarItems { get;/* internal set;*/ }
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Rectangle ContainerArea
{
}
}
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool IgnoresContainerArea
{
set { SetValue(IgnoresContainerAreaProperty, value); }
}
+ /// <summary>
+ /// For internal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public ObservableCollection<Element> InternalChildren { get; } = new ObservableCollection<Element>();
internal override ReadOnlyCollection<Element> LogicalChildrenInternal =>
_logicalChildren ?? (_logicalChildren = new ReadOnlyCollection<Element>(InternalChildren));
+ /// <summary>
+ /// Raised when the layout of the Page has changed.
+ /// </summary>
public event EventHandler LayoutChanged;
+ /// <summary>
+ /// ndicates that the Page is about to appear.
+ /// </summary>
public event EventHandler Appearing;
+ /// <summary>
+ /// Indicates that the Page is about to cease displaying.
+ /// </summary>
public event EventHandler Disappearing;
+ /// <summary>
+ /// Displays a native platform action sheet, allowing the application user to choose from several buttons.
+ /// </summary>
+ /// <param name="title">Title of the displayed action sheet. Must not be null.</param>
+ /// <param name="cancel">Text to be displayed in the 'Cancel' button. Can be null to hide the cancel action.</param>
+ /// <param name="destruction">Text to be displayed in the 'Destruct' button. Can be null to hide the destructive option.</param>
+ /// <param name="buttons">Text labels for additional buttons. Must not be null.</param>
+ /// <returns>An awaitable Task that displays an action sheet and returns the Text of the button pressed by the user.</returns>
public Task<string> DisplayActionSheet(string title, string cancel, string destruction, params string[] buttons)
{
var args = new ActionSheetArguments(title, cancel, destruction, buttons);
return args.Result.Task;
}
+ /// <summary>
+ /// Presents an alert dialog to the application user with a single cancel button.
+ /// </summary>
+ /// <param name="title">The title of the alert dialog.</param>
+ /// <param name="message">The body text of the alert dialog.</param>
+ /// <param name="cancel">Text to be displayed on the 'Cancel' button.</param>
+ /// <returns></returns>
public Task DisplayAlert(string title, string message, string cancel)
{
return DisplayAlert(title, message, null, cancel);
}
+ /// <summary>
+ /// resents an alert dialog to the application user with an accept and a cancel button.
+ /// </summary>
+ /// <param name="title">The title of the alert dialog.</param>
+ /// <param name="message">The body text of the alert dialog.</param>
+ /// <param name="accept">Text to be displayed on the 'Accept' button.</param>
+ /// <param name="cancel">Text to be displayed on the 'Cancel' button.</param>
+ /// <returns></returns>
public Task<bool> DisplayAlert(string title, string message, string accept, string cancel)
{
if (string.IsNullOrEmpty(cancel))
return args.Result.Task;
}
+ /// <summary>
+ /// Forces the Page to perform a layout pass.
+ /// </summary>
public void ForceLayout()
{
// SizeAllocated(Width, Height);
}
+ /// <summary>
+ /// Calls OnBackButtonPressed().
+ /// </summary>
+ /// <returns></returns>
public bool SendBackButtonPressed()
{
return OnBackButtonPressed();
}
+ /// <summary>
+ /// Lays out children Elements into the specified area.
+ /// </summary>
+ /// <param name="x">Left-hand side of layout area.</param>
+ /// <param name="y">Top of layout area.</param>
+ /// <param name="width">Width of layout area.</param>
+ /// <param name="height">Height of layout area.</param>
protected virtual void LayoutChildren(double x, double y, double width, double height)
{
var area = new Rectangle((int)x, (int)y, (int)width, (int)height);
}
}
+ /// <summary>
+ /// When overridden, allows application developers to customize behavior immediately prior to the Page becoming visible.
+ /// </summary>
protected virtual void OnAppearing()
{
}
+ /// <summary>
+ /// Application developers can override this method to provide behavior when the back button is pressed.
+ /// </summary>
+ /// <returns>true if consumed</returns>
protected virtual bool OnBackButtonPressed()
{
var application = RealParent as Application;
return !canceled;
}
+ /// <summary>
+ /// Invoked whenever the binding context of the Page changes. Override this method to add class handling for this event.
+ /// </summary>
protected override void OnBindingContextChanged()
{
base.OnBindingContextChanged();
}
}
+ /// <summary>
+ /// Indicates that the preferred size of a child Element has changed.
+ /// </summary>
+ /// <param name="sender">The object that raised the event.</param>
+ /// <param name="e">The event arguments.</param>
protected virtual void OnChildMeasureInvalidated(object sender, EventArgs e)
{
InvalidationTrigger trigger = (e as InvalidationEventArgs)?.Trigger ?? InvalidationTrigger.Undefined;
OnChildMeasureInvalidated((/*VisualElement*/BaseHandle)sender, trigger);
}
+ /// <summary>
+ /// When overridden, allows the application developer to customize behavior as the Page disappears.
+ /// </summary>
protected virtual void OnDisappearing()
{
}
+ /// <summary>
+ /// Called when the Page's Parent property has changed.
+ /// </summary>
protected override void OnParentSet()
{
//if (!Application.IsApplicationOrNull(RealParent) && !(RealParent is Page))
base.OnParentSet();
}
- // protected override void OnSizeAllocated(double width, double height)
- // {
- // _allocatedFlag = true;
- // //base.OnSizeAllocated(width, height);
- // UpdateChildrenLayout();
- // }
+ ///// <summary>
+ ///// Indicates that the Page has been assigned a size.
+ ///// </summary>
+ // protected override void OnSizeAllocated(double width, double height)
+ // {
+ // _allocatedFlag = true;
+ // //base.OnSizeAllocated(width, height);
+ // UpdateChildrenLayout();
+ // }
- protected void UpdateChildrenLayout()
+ /// <summary>
+ /// Requests that the children Elements of the Page update their layouts.
+ /// </summary>
+ protected void UpdateChildrenLayout()
{
if (!ShouldLayoutChildren())
return;
}
}
+ /// <summary>
+ /// For intarnal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SendAppearing()
{
//FindApplication(this)?.OnPageAppearing(this);
}
+ /// <summary>
+ /// For intarnal use.
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void SendDisappearing()
{
return !any;
}
+ /// <summary>
+ /// Returns the platform-specific instance of this Page, on which a platform-specific method may be called.
+ /// </summary>
+ /// <typeparam name="T">The platform for which to return an instance.</typeparam>
+ /// <returns>The platform-specific instance of this Page</returns>
public IPlatformElementConfiguration<T, Page> On<T>() where T : IConfigPlatform
{
return _platformConfigurationRegistry.Value.On<T>();
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// Struct that defines minimum and maximum Sizes.
+ /// </summary>
[DebuggerDisplay("Request={Request.Width}x{Request.Height}, Minimum={Minimum.Width}x{Minimum.Height}")]
public struct SizeRequest
{
+ /// <summary>
+ /// The requested size.
+ /// </summary>
public Size Request { get; set; }
+ /// <summary>
+ /// The minimum acceptable size.
+ /// </summary>
public Size Minimum { get; set; }
+ /// <summary>
+ /// Creates a new SizeRequest object that requests at least the size minimum, but preferably the size request.
+ /// </summary>
+ /// <param name="request">The size of the request.</param>
+ /// <param name="minimum">The minimum size for the request.</param>
public SizeRequest(Size request, Size minimum)
{
Request = request;
Minimum = minimum;
}
+ /// <summary>
+ /// Creates a new SizeRequest with the specified request size.
+ /// </summary>
+ /// <param name="request">The size of the request.</param>
public SizeRequest(Size request)
{
Request = request;
Minimum = request;
}
+ /// <summary>
+ /// Returns a string representation of the size request.
+ /// </summary>
+ /// <returns>a string representation of the size request.</returns>
public override string ToString()
{
return string.Format("{{Request={0} Minimum={1}}}", Request, Minimum);
namespace Tizen.NUI
{
+ /// <summary>
+ /// A page that displays full-screen content with a control template, and the base class for ContentPage.
+ /// </summary>
public class TemplatedPage : Page, IControlTemplated
{
+ /// <summary>
+ /// Backing store for the ControlTemplate property.
+ /// </summary>
public static readonly BindableProperty ControlTemplateProperty = BindableProperty.Create(nameof(ControlTemplate), typeof(ControlTemplate), typeof(TemplatedPage), null,
propertyChanged: TemplateUtilities.OnControlTemplateChanged);
+ /// <summary>
+ /// Gets or sets the control template that is used to display content.
+ /// </summary>
public ControlTemplate ControlTemplate
{
get { return (ControlTemplate)GetValue(ControlTemplateProperty); }
namespace Tizen.NUI.Binding
{
+ /// <summary>
+ /// Struct defining thickness around the edges of a Rectangle using doubles.
+ /// </summary>
[DebuggerDisplay("Left={Left}, Top={Top}, Right={Right}, Bottom={Bottom}, HorizontalThickness={HorizontalThickness}, VerticalThickness={VerticalThickness}")]
[TypeConverter(typeof(ThicknessTypeConverter))]
public struct Thickness
{
+ /// <summary>
+ /// The thickness of the left side of a rectangle.
+ /// </summary>
public double Left { get; set; }
+ /// <summary>
+ /// The thickness of the top of a rectangle.
+ /// </summary>
public double Top { get; set; }
+ /// <summary>
+ /// The thickness of the right side of a rectangle.
+ /// </summary>
public double Right { get; set; }
+ /// <summary>
+ /// The thickness of the bottom of a rectangle.
+ /// </summary>
public double Bottom { get; set; }
+ /// <summary>
+ /// The sum of Left and Right.
+ /// </summary>
public double HorizontalThickness
{
get { return Left + Right; }
}
+ /// <summary>
+ /// The sum of Top and Bottom.
+ /// </summary>
public double VerticalThickness
{
get { return Top + Bottom; }
get { return Left == 0 && Top == 0 && Right == 0 && Bottom == 0; }
}
+ /// <summary>
+ /// Creates a new Thickness object that represents a uniform thickness of size uniformSize.
+ /// </summary>
+ /// <param name="uniformSize">The uniform size of all edges in the new thickness.</param>
public Thickness(double uniformSize) : this(uniformSize, uniformSize, uniformSize, uniformSize)
{
}
+ /// <summary>
+ /// Creates a new Thickness object that has a horizontal thickness of horizontalSize and a vertical thickness of verticalSize.
+ /// </summary>
+ /// <param name="horizontalSize">The width of the left and right thicknesses.</param>
+ /// <param name="verticalSize">The height of the top and bottom thicknesses.</param>
public Thickness(double horizontalSize, double verticalSize) : this(horizontalSize, verticalSize, horizontalSize, verticalSize)
{
}
+ /// <summary>
+ /// Creates a new Thickness object with thicknesses defined by left, top, right, and bottom.
+ /// </summary>
+ /// <param name="left">The width of the left thickness.</param>
+ /// <param name="top">The height of the top thickness.</param>
+ /// <param name="right">The width of the right thickness.</param>
+ /// <param name="bottom">The height of the bottom thickness.</param>
public Thickness(double left, double top, double right, double bottom) : this()
{
Left = left;
Bottom = bottom;
}
+ /// <summary>
+ /// Converts a Size into a Thickness.
+ /// </summary>
+ /// <param name="size">A Size to convert to a Thickness</param>
public static implicit operator Thickness(Size size)
{
return new Thickness(size.Width, size.Height, size.Width, size.Height);
}
+ /// <summary>
+ /// Implicit cast operator from Double.
+ /// </summary>
+ /// <param name="uniformSize">The value for the uniform Thickness.</param>
public static implicit operator Thickness(double uniformSize)
{
return new Thickness(uniformSize);
}
+ /// <summary>
+ /// Whether the other has equivalent values.
+ /// </summary>
+ /// <param name="other">A Thickness to be compared.</param>
+ /// <returns>true if other has equivalent values.</returns>
bool Equals(Thickness other)
{
return Left.Equals(other.Left) && Top.Equals(other.Top) && Right.Equals(other.Right) && Bottom.Equals(other.Bottom);
}
+ /// <summary>
+ /// Whether the obj has equivalent values.
+ /// </summary>
+ /// <param name="obj">A Thickness to be compared.</param>
+ /// <returns>true if obj is a Thickness and has equivalent values.</returns>
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj))
return obj is Thickness && Equals((Thickness)obj);
}
+ /// <summary>
+ /// A hash value for this Thickness.
+ /// </summary>
+ /// <returns>The hash value</returns>
public override int GetHashCode()
{
unchecked
}
}
+ /// <summary>
+ /// Whether two Thicknesses have identical values.
+ /// </summary>
+ /// <param name="left">A Thickness to be compared.</param>
+ /// <param name="right">A Thickness to be compared.</param>
+ /// <returns>true if left and right have identical values for Left,Right, Top, and Bottom.</returns>
public static bool operator ==(Thickness left, Thickness right)
{
return left.Equals(right);
}
+ /// <summary>
+ /// Whether the values of two Thickness's have at least one difference.
+ /// </summary>
+ /// <param name="left">A Thickness to be compared.</param>
+ /// <param name="right">A Thickness to be compared.</param>
+ /// <returns>true if any of the Left,Right, Top, and Bottom values differ between left and right.</returns>
public static bool operator !=(Thickness left, Thickness right)
{
return !left.Equals(right);
}
+ /// <summary>
+ /// Stores the components of the thickness in the corresponding arguments.
+ /// </summary>
+ /// <param name="left">Variable in which to store the left thickness of thickness object.</param>
+ /// <param name="top">Variable in which to store the top thickness of thickness object.</param>
+ /// <param name="right">Variable in which to store the right thickness of thickness object.</param>
+ /// <param name="bottom">Variable in which to store the bottom thickness of thickness object.</param>
public void Deconstruct(out double left, out double top, out double right, out double bottom)
{
left = Left;