/*
- * Copyright(c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2020-2021 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.
namespace Tizen.NUI.BaseComponents
{
/// <summary>
- /// Class for describing the states of the view.
+ /// Class for describing the states of control.
+ /// If a non-control view class would want to get the control state, please refer <see cref="View.EnableControlState"/>.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
[Binding.TypeConverter(typeof(ControlStateTypeConverter))]
public class ControlState : IEquatable<ControlState>
{
private static readonly Dictionary<string, ControlState> stateDictionary = new Dictionary<string, ControlState>();
//Default States
/// <summary>
- /// All State.
+ /// The All state is used in a selector class. It represents all states, so if this state is defined in a selector, the other states are ignored.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static readonly ControlState All = Create("All");
/// <summary>
/// Normal State.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static readonly ControlState Normal = Create("Normal");
/// <summary>
/// Focused State.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static readonly ControlState Focused = Create("Focused");
/// <summary>
/// Pressed State.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static readonly ControlState Pressed = Create("Pressed");
/// <summary>
/// Disabled State.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static readonly ControlState Disabled = Create("Disabled");
/// <summary>
/// Selected State.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static readonly ControlState Selected = Create("Selected");
/// <summary>
/// SelectedPressed State.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly ControlState SelectedFocused = Selected + Focused;
/// <summary>
- /// Other State.
+ /// This is used in a selector class. It represents all other states except for states that are already defined in a selector.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static readonly ControlState Other = Create("Other");
private List<ControlState> stateList = new List<ControlState>();
/// </summary>
/// <param name="name">The state name.</param>
/// <returns>The <see cref="ControlState"/> instance which has single state.</returns>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <exception cref="ArgumentNullException">Thrown when the given name is null.</exception>
+ /// <exception cref="ArgumentException">Thrown when the given name is invalid.</exception>
+ /// <since_tizen> 9 </since_tizen>
public static ControlState Create(string name)
{
if (name == null)
/// </summary>
/// <param name="state">The state to search for</param>
/// <returns>true if the state contain a specified state, otherwise, false.</returns>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <exception cref="ArgumentNullException">Thrown when the given state is null.</exception>
+ /// <since_tizen> 9 </since_tizen>
public bool Contains(ControlState state)
{
if (state == null)
}
/// <inheritdoc/>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public override bool Equals(object obj) => this.Equals(obj as ControlState);
+ /// <since_tizen> 9 </since_tizen>
+ public override bool Equals(object other) => this.Equals(other as ControlState);
/// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
/// <param name="lhs">A <see cref="ControlState"/> on the left hand side.</param>
/// <param name="rhs">A <see cref="ControlState"/> on the right hand side.</param>
/// <returns>true if the ControlStates are equal; otherwise, false.</returns>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static bool operator ==(ControlState lhs, ControlState rhs)
{
// Check for null on left side.
/// <param name="lhs">A <see cref="ControlState"/> on the left hand side.</param>
/// <param name="rhs">A <see cref="ControlState"/> on the right hand side.</param>
/// <returns>true if the ControlStates are not equal; otherwise, false.</returns>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static bool operator !=(ControlState lhs, ControlState rhs) => !(lhs == rhs);
/// <summary>
/// <param name="lhs">A <see cref="ControlState"/> on the left hand side.</param>
/// <param name="rhs">A <see cref="ControlState"/> on the right hand side.</param>
/// <returns>The <see cref="ControlState"/> containing the result of the addition.</returns>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static ControlState operator +(ControlState lhs, ControlState rhs) => Create(lhs, rhs);
/// <summary>
namespace Tizen.NUI.BaseComponents
{
/// <summary>
- /// Selector class, which is related by Control State, it is base class for other Selector.
+ /// The selector class is a collection of a <see cref="ControlState" /> and a T value pair.
/// </summary>
- /// <typeparam name="T">The property type of the selector. if it's reference type, it should be of type <see cref="ICloneable"/> that implement deep copy in <see cref="ICloneable.Clone"/>.</typeparam>
- /// <since_tizen> 6 </since_tizen>
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ /// <typeparam name="T">The property type of the selector. If it's reference type, it is recommended to be a type implementing <see cref="ICloneable"/>.</typeparam>
+ /// <since_tizen> 9 </since_tizen>
[SuppressMessage("Microsoft.Naming",
"CA1710:IdentifiersShouldHaveCorrectSuffix",
Justification = "The name Selector provides meaningful information about the characteristics.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
public class Selector<T> : IEnumerable<SelectorItem<T>>
{
private readonly bool cloneable = typeof(ICloneable).IsAssignableFrom(typeof(T));
[EditorBrowsable(EditorBrowsableState.Never)]
List<SelectorItem<T>> SelectorItems { get; set; } = new List<SelectorItem<T>>();
- /// <since_tizen> 6 </since_tizen>
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ /// <summary>
+ /// Implicitly convert T type value to selector.
+ /// </summary>
+ /// <param name="value">The value will be converted to a selector.</param>
+ /// <since_tizen> 9 </since_tizen>
public static implicit operator Selector<T>(T value)
{
return new Selector<T>(value);
}
- /// Default constructor
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Create an empty selector.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Selector()
{
}
/// </summary>
/// <param name="item">The selector item includes state and value.</param>
/// <exception cref="ArgumentNullException"> Thrown when item is null. </exception>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public void Add(SelectorItem<T> item)
{
if (item == null) throw new ArgumentNullException(nameof(item));
/// <summary>
/// Determines whether the specified object is equal to the current object.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public override bool Equals(System.Object other)
+ /// <since_tizen> 9 </since_tizen>
+ public override bool Equals(object other)
{
var x = other as Selector<T>;
}
/// <summary>
- /// The selector item class that stores a state-value pair.
+ /// The selector item class that stores a control state and a T value pair.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <typeparam name="T">The property type of the selector.</typeparam>
+ /// <since_tizen> 9 </since_tizen>
public class SelectorItem<T>
{
/// <summary>
/// </summary>
/// <param name="state">The state</param>
/// <param name="value">The value associated with state.</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public SelectorItem(ControlState state, T value)
{
State = state;
}
/// <summary>
- /// The state
+ /// The control state.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public ControlState State { get; set; }
+ /// <since_tizen> 9 </since_tizen>
+ public ControlState State { get; internal set; }
/// <summary>
- /// The value associated with state.
+ /// The value associated with control state.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public T Value { get; set; }
+ /// <since_tizen> 9 </since_tizen>
+ public T Value { get; internal set; }
/// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
namespace Tizen.NUI.BaseComponents
{
/// <summary>
- /// The base class for Children attributes in Components.
+ /// The base class of style attributes for a view.
/// </summary>
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public partial class ViewStyle : BindableObject, IDisposable
{
private bool disposed = false;
static ViewStyle() { }
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Create an empty style instance.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public ViewStyle() { }
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
CopyFrom(viewAttributes);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the image resource url of the background of view.
+ /// The mutually exclusive with "BackgroundColor". Setting it overwrites existing "BackgroundColor".
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Selector<string> BackgroundImage
{
get
set => SetValue(Size2DProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Defines view's opacity value.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Selector<float?> Opacity
{
get
set => SetValue(Position2DProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Determines whether the pivot point should be used to determine the position of the view.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public bool? PositionUsesPivotPoint
{
get => (bool?)GetValue(PositionUsesPivotPointProperty);
set => SetValue(PositionUsesPivotPointProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the origin of a view within its parent's area.<br />
+ /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
+ /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
+ /// A view's position is the distance between this origin and the view's anchor-point.<br />
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Position ParentOrigin
{
get => (Position)GetValue(ParentOriginProperty);
set => SetValue(ParentOriginProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the pivot point of a view.<br />
+ /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the view, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
+ /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
+ /// A view position is the distance between its parent origin and this pivot point.<br />
+ /// A view's orientation is the rotation from its default orientation, the rotation is centered around its pivot point.<br />
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Position PivotPoint
{
get => (Position)GetValue(PivotPointProperty);
set => SetValue(PivotPointProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the width of the view.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public float? SizeWidth
{
get => (float?)GetValue(SizeWidthProperty);
set => SetValue(SizeWidthProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the height of the view.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public float? SizeHeight
{
get => (float?)GetValue(SizeHeightProperty);
set => SetValue(SizeHeightProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the position of the view.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Position Position
{
get => (Position)GetValue(PositionProperty);
set => SetValue(DrawModeProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the relative to parent size factor of the view.<br />
+ /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
+ /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Vector3 SizeModeFactor
{
get => (Vector3)GetValue(SizeModeFactorProperty);
set => SetValue(SizeModeFactorProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the width resize policy to be used.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public ResizePolicyType? WidthResizePolicy
{
get => (ResizePolicyType?)GetValue(WidthResizePolicyProperty);
set => SetValue(WidthResizePolicyProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the height resize policy to be used.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public ResizePolicyType? HeightResizePolicy
{
get => (ResizePolicyType?)GetValue(HeightResizePolicyProperty);
set => SetValue(HeightForWidthProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the padding for use in layout.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Extents Padding
{
get => (Extents)GetValue(PaddingProperty) ?? (padding = new Extents());
set => SetValue(PaddingProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the minimum size the view can be assigned in size negotiation.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Size2D MinimumSize
{
get => (Size2D)GetValue(MinimumSizeProperty);
set => SetValue(MinimumSizeProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the maximum size the view can be assigned in size negotiation.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Size2D MaximumSize
{
get => (Size2D)GetValue(MaximumSizeProperty);
set => SetValue(ClippingModeProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Sets the size of a view for the width, the height, and the depth.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Size Size
{
get => (Size)GetValue(SizeProperty);
set => SetValue(SizeProperty, value);
}
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the Margin for use in layout.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Extents Margin
{
get => (Extents)GetValue(MarginProperty) ?? (margin = new Extents());
set => SetValue(MarginProperty, value);
}
- /// <summary> View BackgroundColor </summary>
- /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Gets or sets the color of the background of view.
+ /// The mutually exclusive with "BackgroundImage". Setting it overwrites existing "BackgroundImage".
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Selector<Color> BackgroundColor
{
get
/// <summary>
/// Describes a box shaped shadow drawing for a View.
- /// It is null by default.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Selector<Shadow> BoxShadow
{
get => (Selector<Shadow>)GetValue(BoxShadowProperty);
/// The radius for the rounded corners of the View.
/// The values in Vector4 are used in clockwise order from top-left to bottom-left : Vector4(top-left-corner, top-right-corner, bottom-right-corner, bottom-left-corner).
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Vector4 CornerRadius
{
get => (Vector4)GetValue(CornerRadiusProperty);
/// It is absolute by default.
/// When the policy is relative, the corner radius is relative to the smaller of the view's width and height.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public VisualTransformPolicyType? CornerRadiusPolicy
{
get => (VisualTransformPolicyType?)GetValue(CornerRadiusPolicyProperty);
/// <summary>
/// Release instance.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Release instance.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <param name="disposing"> If it true, the method has been called by a user's code. Otherwise the method has been called by the finalizer. </param>
+ /// <since_tizen> 9 </since_tizen>
protected virtual void Dispose(bool disposing)
{
if (disposed)
/// It is null by default.
/// </summary>
/// <remarks>
- /// Getter returns copied instance of current shadow.
- /// </remarks>
- /// <remarks>
/// The mutually exclusive with "ImageShadow".
/// </remarks>
/// <remarks>
/// Animatable sub-property : Offset, Color, BlurRadius.
/// </para>
/// </remarks>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Shadow BoxShadow
{
get
/// Animatable - This property can be animated using <c>Animation</c> class.
/// </para>
/// </remarks>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Vector4 CornerRadius
{
get
/// It is absolute by default.
/// When the policy is relative, the corner radius is relative to the smaller of the view's width and height.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public VisualTransformPolicyType CornerRadiusPolicy
{
get => (VisualTransformPolicyType)GetValue(CornerRadiusPolicyProperty);
/// If the value is true, the View will change its style as the theme changes.
/// It is false by default, but turned to true when setting StyleName (by setting property or using specified constructor).
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public bool ThemeChangeSensitive
{
get => (bool)GetValue(ThemeChangeSensitiveProperty);
/// Apply style instance to the view.
/// Basically it sets the bindable property to the value of the bindable property with same name in the style.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public virtual void ApplyStyle(ViewStyle viewStyle)
{
if (viewStyle == null || this.viewStyle == viewStyle) return;
/// Each ViewStyle item is identified by a string key that can be matched the <seealso cref="View.StyleName"/>.
/// </para>
/// <para>
- /// The main purpose of providing Theme is to separate style details from the structure.
+ /// The main purpose of providing theme is to separate style details from the structure.
/// Managing style separately makes it easier to customize the look of application by user context.
- /// Also since a Theme can be created from xaml file, it can be treated as a resource.
+ /// Also since a theme can be created from xaml file, it can be treated as a resource.
/// This enables sharing styles with other applications.
/// </para>
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public class Theme : BindableObject
{
private readonly Dictionary<string, ViewStyle> map;
private string baseTheme;
ResourceDictionary resources;
- /// <summary>Create an empty theme.</summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>
+ /// Create an empty theme.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
public Theme()
{
map = new Dictionary<string, ViewStyle>();
}
- /// <summary>Create a new theme from the xaml file.</summary>
+ /// <summary>
+ /// Create a new theme from the xaml file.
+ /// </summary>
/// <param name="xamlFile">An absolute path to the xaml file.</param>
/// <exception cref="ArgumentNullException">Thrown when the given xamlFile is null or empty string.</exception>
/// <exception cref="global::System.IO.IOException">Thrown when there are file IO problems.</exception>
/// <exception cref="Exception">Thrown when the content of the xaml file is not valid xaml form.</exception>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Theme(string xamlFile) : this()
{
if (string.IsNullOrEmpty(xamlFile))
/// <summary>
/// The string key to identify the Theme.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public string Id { get; set; }
/// <summary>
- /// The string key to identify the Theme.
+ /// The version of the Theme.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public string Version { get; set; } = null;
/// <summary>
/// Gets a style of given style name.
/// </summary>
/// <param name="styleName">The string key to find a ViewStyle.</param>
- /// <returns>Founded style instance.</returns>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <returns>Found style instance if the style name has been found, otherwise null.</returns>
+ /// <exception cref="ArgumentNullException">Thrown when the given styleName is null.</exception>
+ /// <since_tizen> 9 </since_tizen>
public ViewStyle GetStyle(string styleName)
{
- map.TryGetValue(styleName, out ViewStyle result);
+ map.TryGetValue(styleName ?? throw new ArgumentNullException(nameof(styleName)), out ViewStyle result);
return result;
}
/// Gets a style of given view type.
/// </summary>
/// <param name="viewType">The type of View.</param>
- /// <returns>Founded style instance.</returns>
+ /// <returns>Found style instance if the view type is found, otherwise null.</returns>
/// <exception cref="ArgumentNullException">Thrown when the given viewType is null.</exception>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public ViewStyle GetStyle(Type viewType)
{
var currentType = viewType ?? throw new ArgumentNullException(nameof(viewType));
/// </summary>
/// <param name="styleName">The style name to add.</param>
/// <param name="value">The style instance to add.</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public void AddStyle(string styleName, ViewStyle value) => map[styleName] = value?.Clone();
-
+ /// <exception cref="ArgumentNullException">Thrown when the given styleName is null.</exception>
+ /// <since_tizen> 9 </since_tizen>
+ public void AddStyle(string styleName, ViewStyle value)
+ {
+ if (styleName == null)
+ {
+ throw new ArgumentNullException(nameof(styleName));
+ }
+ map[styleName] = value?.Clone();
+ }
/// <inheritdoc/>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public object Clone()
{
var result = new Theme()
return result;
}
- /// <summary>Merge other Theme into this.</summary>
+ /// <summary>Merge other theme into this.</summary>
/// <param name="xamlFile">An absolute path to the xaml file of the theme.</param>
/// <exception cref="ArgumentException">Thrown when the given xamlFile is null or empty string.</exception>
/// <exception cref="global::System.IO.IOException">Thrown when there are file IO problems.</exception>
MergeWithoutClone(new Theme(xamlFile));
}
- /// <summary>Merge other Theme into this.</summary>
- /// <param name="theme">The Theme.</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <summary>Merge other theme into this.</summary>
+ /// <param name="theme">The theme to be merged with this theme.</param>
+ /// <since_tizen> 9 </since_tizen>
public void Merge(Theme theme)
{
if (theme == null)
/*
- * Copyright(c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2021 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.
namespace Tizen.NUI
{
/// <summary>
+ /// The event arguments that hold data for the event <see cref="ThemeManager.ThemeChanged"/>.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public class ThemeChangedEventArgs : EventArgs
{
/// <summary>
}
/// <summary>
+ /// The new theme's ID.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public string ThemeId { get; }
}
}
namespace Tizen.NUI
{
/// <summary>
- /// This static module provides methods that can manage NUI <seealso cref="Theme"/>.
+ /// This static module provides methods that can manage NUI <see cref="Theme"/>.
/// </summary>
/// <example>
- /// To apply custom theme to the application, try <seealso cref="ApplyTheme(Theme)"/>.
+ /// To apply custom theme to the application, try <see cref="ApplyTheme(Theme)"/>.
/// <code>
/// var customTheme = new Theme(res + "customThemeFile.xaml");
/// ThemeManager.ApplyTheme(customTheme);
/// </code>
/// </example>
/// <summary></summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static class ThemeManager
{
private static Theme defaultTheme;
}
/// <summary>
- /// An event invoked after the theme has changed by <seealso cref="ApplyTheme(Theme)"/>.
+ /// An event invoked after the theme has changed by <see cref="ApplyTheme(Theme)"/>.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static event EventHandler<ThemeChangedEventArgs> ThemeChanged;
/// <summary>
/// </summary>
/// <param name="theme">The theme instance to be applied.</param>
/// <exception cref="ArgumentNullException">Thrown when the given theme is null.</exception>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static void ApplyTheme(Theme theme)
{
var newTheme = (Theme)theme?.Clone() ?? throw new ArgumentNullException(nameof(theme));
/// <summary>
/// Load a style with style name in the current theme.
- /// For components, the style name is a component name (e.g. Button) in normal case.
+ /// For components, the default style name of a component is a component name with namespace (e.g. Tizen.NUI.Components.Button).
/// </summary>
/// <param name="styleName">The style name.</param>
/// <exception cref="ArgumentNullException">Thrown when the given styleName is null.</exception>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static ViewStyle GetStyle(string styleName)
{
if (styleName == null) throw new ArgumentNullException(nameof(styleName));
}
/// <summary>
- /// Load a style with View type in the current theme.
+ /// Load a style with view type in the current theme.
+ /// If it failed to find a style with the given type, it will try with it's parent type until it succeeds.
/// </summary>
- /// <param name="viewType">The type of View.</param>
+ /// <param name="viewType"> The type of the view. Full name of the given type will be a key to find a style in the current theme. (e.g. Tizen.NUI.Components.Button) </param>
/// <exception cref="ArgumentNullException">Thrown when the given viewType is null.</exception>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static ViewStyle GetStyle(Type viewType)
{
if (viewType == null) throw new ArgumentNullException(nameof(viewType));
/// <summary>
/// Represents a shadow with color and blur radius for a View.
/// </summary>
+ /// <since_tizen> 9 </since_tizen>
[Tizen.NUI.Binding.TypeConverter(typeof(Tizen.NUI.Binding.ShadowTypeConverter))]
- [EditorBrowsable(EditorBrowsableState.Never)]
public class Shadow : ShadowBase, ICloneable
{
private static readonly Color noColor = new Color(0, 0, 0, 0);
/// <summary>
/// Create a Shadow with default values.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Shadow() : base()
{
BlurRadius = 0;
/// <summary>
/// Create a Shadow with custom values.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <param name="blurRadius">The blur radius value for the shadow. Bigger value, much blurry.</param>
+ /// <param name="color">The color for the shadow.</param>
+ /// <param name="offset">Optional. The position offset value (x, y) from the top left corner. See <see cref="ShadowBase.Offset"/>.</param>
+ /// <param name="extents">Optional. The shadow will extend its size by specified amount of length. See <see cref="ShadowBase.Extents"/>.</param>
+ /// <since_tizen> 9 </since_tizen>
public Shadow(float blurRadius, Color color, Vector2 offset = null, Vector2 extents = null) : base(offset, extents)
{
BlurRadius = blurRadius;
/// <summary>
/// The color for the shadow.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Color Color { get; internal set; }
/// <summary>
/// <remark>
/// Negative value is ignored. (no blur)
/// </remark>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public float BlurRadius { get; internal set; }
/// <inheritdoc/>
namespace Tizen.NUI
{
/// <summary>
- /// The property map class that has transform property for one of its items.
- /// This class can be used to convert visual properties to map.
+ /// The base class to describe basic shadow.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public abstract class ShadowBase
{
private static readonly Vector2 noOffset = new Vector2(0, 0);
/// <summary>
/// The position offset value (x, y) from the top left corner.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Vector2 Offset { get; internal set; }
/// <summary>
/// For example, when View's size is (100, 100) and the Shadow's Extents is (5, -5),
/// the output shadow will have size (105, 95).
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Vector2 Extents { get; internal set; }
/// <summary>
/// Equality operator.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static bool operator ==(ShadowBase shadow1, ShadowBase shadow2)
{
return object.ReferenceEquals(shadow1, null) ? object.ReferenceEquals(shadow2, null) : shadow1.Equals(shadow2);
/// <summary>
/// Inequality operator.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public static bool operator !=(ShadowBase shadow1, ShadowBase shadow2)
{
return !(shadow1 == shadow2);
}
/// <inheritdoc/>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public override bool Equals(object other)
{
if ((other == null) || !GetType().Equals(other.GetType()))