namespace Tizen.Xamarin.Forms.Extension
{
/// <summary>
- /// Background class provides the properties for Background.
+ /// Background class is for providing a background using images.
+ /// Background normally works as Image, so it should be used with another layout to be set as a background.
/// </summary>
/// <example>
/// <code>
- /// new Background
+ /// Background bg = new Background
/// {
/// Image = new FileImageSource { File = "icon.png" },
/// Option = BackgroundOptions.Tile,
- /// }
+ /// };
+ ///
+ /// AbsoluteLayout aLayout = new AbsoluteLayout();
+ /// AbsoluteLayout.SetLayoutFlags(bg, AbsoluteLayoutFlags.All);
+ /// AbsoluteLayout.SetLayoutBounds(bg, new Rectangle(/*X*/,/*Y*/,/*WIDTH*/,/*HEIGHT*/));
+ /// aLayout.Children.Add(bg);
+ ///
+ /// RelativeLayout rLayout = new RelativeLayout();
+ /// rLayout.Children.Add(
+ /// bg,
+ /// Constraint.RelativeToParent((parent) => { return /*X*/ },
+ /// Constraint.RelativeToParent((parent) => { return /*Y*/ },
+ /// Constraint.RelativeToParent((parent) => { return /*WIDTH*/ },
+ /// Constraint.RelativeToParent((parent) => { return /*HEIGHT*/ }
+ /// );
/// </code>
/// </example>
public class Background : View
{
+ /// <summary>
+ /// BindableProperty. Identifies the Image bindable property.
+ /// </summary>
public static readonly BindableProperty ImageProperty = BindableProperty.Create("Image", typeof(FileImageSource), typeof(Background), default(FileImageSource));
+ /// <summary>
+ /// BindableProperty. Identifies the Option bindable property.
+ /// </summary>
public static readonly BindableProperty OptionProperty = BindableProperty.Create("Option", typeof(BackgroundOptions), typeof(Background), BackgroundOptions.Scale);
/// <summary>
/// Gets or Sets the Image on the background.
/// This identifier is the image path to the image.
- /// This is a bindable property.
/// It can be nullable.
/// </summary>
public FileImageSource Image
/// <summary>
/// Gets or Sets the BackgroundOption on the background.
/// This identifiers on how a background is to display its image.
- /// This is a bindable property.
/// Defalt value is BackgroundOptions.Scale.
/// </summary>
public BackgroundOptions Option
set { SetValue(OptionProperty, value); }
}
}
-}
+}
\ No newline at end of file
/// </example>
public class ColorSelector : View
{
+ /// <summary>
+ /// BindableProperty. Identifies the SelectedColor bindable property.
+ /// </summary>
public static readonly BindableProperty SelectedColorProperty = BindableProperty.Create("SelectedColor", typeof(Color), typeof(ColorSelector), Color.Default, propertyChanged: OnSelectedColorChanged );
/// <summary>
colorSelector.ColorChanged?.Invoke(colorSelector, new ColorChangedEventArgs(((Color)oldValue), (Color)newValue));
}
}
-}
+}
\ No newline at end of file
static ContextPopupDirectionPriorities _priorities =
new ContextPopupDirectionPriorities(ContextPopupDirection.Up, ContextPopupDirection.Left, ContextPopupDirection.Right, ContextPopupDirection.Down);
+ /// <summary>
+ /// BindableProperty. Identifies the Orientation bindable property.
+ /// </summary>
public static readonly BindableProperty OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(ContextPopupOrientation), typeof(ContextPopup),
defaultValue: ContextPopupOrientation.Vertical);
+ /// <summary>
+ /// BindableProperty. Identifies the IsAutoHidingEnabled bindable property.
+ /// </summary>
public static readonly BindableProperty IsAutoHidingEnabledProperty = BindableProperty.Create(nameof(IsAutoHidingEnabled), typeof(bool), typeof(ContextPopup), defaultValue: true);
+ /// <summary>
+ /// BindableProperty. Identifies the DirectionPriorities bindable property.
+ /// </summary>
public static readonly BindableProperty DirectionPrioritiesProperty = BindableProperty.Create(nameof(DirectionPriorities), typeof(ContextPopupDirectionPriorities),
typeof(ContextPopup), defaultValue: _priorities);
+ /// <summary>
+ /// BindableProperty. Identifies the SelectedIndex bindable property.
+ /// </summary>
public static readonly BindableProperty SelectedIndexProperty = BindableProperty.Create(nameof(SelectedIndex), typeof(int), typeof(ContextPopup), defaultValue: -1,
propertyChanged: OnSelectedIndexChanged, coerceValue: CoerceSelectedIndex);
+ /// <summary>
+ /// BindableProperty. Identifies the SelectedItem bindable property.
+ /// </summary>
public static readonly BindableProperty SelectedItemProperty = BindableProperty.Create(nameof(SelectedItem), typeof(object), typeof(ContextPopup), null,
propertyChanged: OnSelectedItemChanged);
+ /// <summary>
+ /// BindableProperty. Identifies the ItemsSource bindable property.
+ /// </summary>
public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create(nameof(ItemsSource), typeof(IList), typeof(ContextPopup), default(IList),
propertyChanged: OnItemsSourceChanged);
return Math.Min(max, Math.Max(self, min));
}
}
-}
+}
\ No newline at end of file
/// </example>
public class DateTimeView : View
{
+ /// <summary>
+ /// BindableProperty. Identifies the DateTime bindable property.
+ /// </summary>
public static readonly BindableProperty DateTimeProperty = BindableProperty.Create(nameof(DateTime), typeof(DateTime), typeof(DateTimeView), DateTime.Now, BindingMode.TwoWay, coerceValue: CoerceDate,
propertyChanged: DatePropertyChanged);
+ /// <summary>
+ /// BindableProperty. Identifies the DisplayFormat bindable property.
+ /// </summary>
public static readonly BindableProperty DisplayFormatProperty = BindableProperty.Create(nameof(DisplayFormat), typeof(string), typeof(DateTimeView), "%F");
+ /// <summary>
+ /// BindableProperty. Identifies the MinimumDate bindable property.
+ /// </summary>
public static readonly BindableProperty MinimumDateProperty = BindableProperty.Create(nameof(MinimumDate), typeof(DateTime), typeof(DateTimeView), new DateTime(1900, 1, 1),
validateValue: ValidateMinimumDate, coerceValue: CoerceMinimumDate);
+ /// <summary>
+ /// BindableProperty. Identifies the MaximumDate bindable property.
+ /// </summary>
public static readonly BindableProperty MaximumDateProperty = BindableProperty.Create(nameof(MaximumDate), typeof(DateTime), typeof(DateTimeView), new DateTime(2100, 12, 31),
validateValue: ValidateMaximumDate, coerceValue: CoerceMaximumDate);
/// </example>
public class DropdownList : View
{
+ /// <summary>
+ /// BindableProperty. Identifies the SelectedItem bindable property.
+ /// </summary>
public static readonly BindableProperty SelectedItemProperty = BindableProperty.Create("SelectedItem", typeof(object), typeof(DropdownList), default(object), BindingMode.TwoWay, coerceValue: OnCoerceSelectedItem, propertyChanged: OnSelectedItemChanged);
+ /// <summary>
+ /// BindableProperty. Identifies the IsHorizontal bindable property.
+ /// </summary>
public static readonly BindableProperty IsHorizontalProperty = BindableProperty.Create("IsHorizontal", typeof(bool), typeof(DropdownList), default(bool));
+ /// <summary>
+ /// BindableProperty. Identifies the IsExpanded bindable property.
+ /// </summary>
public static readonly BindableProperty IsExpandedProperty = BindableProperty.Create("IsExpanded", typeof(bool), typeof(DropdownList), default(bool));
+ /// <summary>
+ /// BindableProperty. Identifies the ItemsSource bindable property.
+ /// </summary>
public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create("ItemsSource", typeof(IEnumerable), typeof(DropdownList), default(IEnumerable), propertyChanged: OnItemsSourceChanged);
+ /// <summary>
+ /// BindableProperty. Identifies the DisplayMemberPath bindable property.
+ /// </summary>
public static readonly BindableProperty DisplayMemberPathProperty = BindableProperty.Create("DisplayMemberPath", typeof(string), typeof(DropdownList), default(string), propertyChanged: OnDisplayMemberPathChanged);
/// <summary>
case NotifyCollectionChangedAction.Add:
AddItems(e);
break;
+
case NotifyCollectionChangedAction.Remove:
RemoveItems(e);
break;
+
default: //Move, Replace, Reset
ResetItems();
break;
dropdownList.ResetItems();
}
}
-}
+}
\ No newline at end of file
namespace Tizen.Xamarin.Forms.Extension
{
/// <summary>
- /// The FloatingButton class.
- /// Only supported for mobile profiles.
- /// Only one in the application.
+ /// The FloatingButton is not a real button. It is an area where an application can add up to two FloatingButtonItems.
+ /// It provides an invisible track on which the FloatingButtonItems can be moved.
+ /// An application can create only one FloatingButton instance.
+ /// Therefore, the same FloatingButton instance will be returned even if it is created multiple times.
/// </summary>
+ /// <remarks>
+ /// The FloatingButton is only supported on the Mobile profile.
+ /// </remarks>
/// <example>
/// <code>
/// FloatingButton floatingButton = new FloatingButton
/// item.Icon = new FileImageSource { File = "Icon.png" };
/// item.Clicked += (s,e) => { ... };
/// floatingButton.FirstButton = item;
+ /// floatingButton.SecondButton = null;
///
/// this.Appearing += (s,e) =>
/// {
- /// If (!floatingButton.IsShown)
- /// floatingButton.Show();
- /// }
+ /// If (floatingButton.Position != FloatingButtonPosition.Right)
+ /// floatingButton.SetPosition(FloatingButtonPosition.Right, true);
+ /// };
+ ///
/// this.Disappearing += (s,e) =>
/// {
/// If (floatingButton.IsShown)
/// floatingButton.Hide();
- /// }
+ /// };
/// </code>
/// </example>
public class FloatingButton : BindableObject, IFloatingButton
{
+ /// <summary>
+ /// BindableProperty. Identifies the MovablePosition bindable property.
+ /// </summary>
public static readonly BindableProperty MovablePositionProperty = BindableProperty.Create(nameof(MovablePosition), typeof(FloatingButtonMovablePosition), typeof(FloatingButton), FloatingButtonMovablePosition.All);
+ /// <summary>
+ /// BindableProperty. Identifies the IsShown bindable property.
+ /// </summary>
public static readonly BindableProperty IsShownProperty = BindableProperty.Create(nameof(IsShown), typeof(bool), typeof(FloatingButton), true);
+ /// <summary>
+ /// BindableProperty. Identifies the FirstButton bindable property.
+ /// </summary>
public static readonly BindableProperty FirstButtonProperty = BindableProperty.Create(nameof(FirstButton), typeof(FloatingButtonItem), typeof(FloatingButton), null);
+ /// <summary>
+ /// BindableProperty. Identifies the SecondButton bindable property.
+ /// </summary>
public static readonly BindableProperty SecondButtonProperty = BindableProperty.Create(nameof(SecondButton), typeof(FloatingButtonItem), typeof(FloatingButton), null);
IFloatingButton _floatingButton = null;
/// <summary>
/// Gets or sets the movability state of the FloatingButton.
- /// This is a bindable property.
/// Defalt value is FloatingButtonMovablePosition.All
/// </summary>
public FloatingButtonMovablePosition MovablePosition
/// <summary>
/// Gets the visible state of the FloatingButton.
- /// This is a bindable property.
/// </summary>
public bool IsShown
{
/// <summary>
/// Gets and sets the internal button of the FloatingButton.
- /// This is a bindable property.
/// It can be nullable.
/// </summary>
public FloatingButtonItem FirstButton
/// <summary>
/// Gets and sets the internal button of the FloatingButton.
- /// This is a bindable property.
/// It can be nullable.
/// </summary>
public FloatingButtonItem SecondButton
/// Sets the horizontal position of the FloatingButton.
/// </summary>
/// <param name="position"> The destination position of the FloatingButton. </param>
- /// <param name="animated"> Set the animation when moving the position. </param>
- public void SetPosition(FloatingButtonPosition position, bool animated)
+ /// <param name="animated"> Set the animation when moving the position. Default is false.</param>
+ public void SetPosition(FloatingButtonPosition position, bool animated = false)
{
if (MovablePosition != FloatingButtonMovablePosition.None)
{
const int DefaultItemWidth = -1;
const int DefaultItemHeight = -1;
+ /// <summary>
+ /// BindableProperty. Identifies the ItemHeight bindable property.
+ /// </summary>
public static readonly BindableProperty ItemHeightProperty = BindableProperty.Create("ItemHeight", typeof(int), typeof(GridView), DefaultItemHeight);
+ /// <summary>
+ /// BindableProperty. Identifies the ItemWidth bindable property.
+ /// </summary>
public static readonly BindableProperty ItemWidthProperty = BindableProperty.Create("ItemWidth", typeof(int), typeof(GridView), DefaultItemWidth);
+ /// <summary>
+ /// BindableProperty. Identifies the SelectionMode bindable property.
+ /// </summary>
public static readonly BindableProperty SelectionModeProperty = BindableProperty.Create("SelectionMode", typeof(GridViewSelectionMode), typeof(GridView), GridViewSelectionMode.Default);
+ /// <summary>
+ /// BindableProperty. Identifies the CanSelectionMultiple bindable property.
+ /// </summary>
public static readonly BindableProperty CanSelectionMultipleProperty = BindableProperty.Create("CanSelectionMultiple", typeof(bool), typeof(GridView), false);
+ /// <summary>
+ /// BindableProperty. Identifies the IsHighlight bindable property.
+ /// </summary>
public static readonly BindableProperty IsHighlightEffectEnabledProperty = BindableProperty.Create("IsHighlight", typeof(bool), typeof(GridView), true);
+ /// <summary>
+ /// BindableProperty. Identifies the FillItems bindable property.
+ /// </summary>
public static readonly BindableProperty FillItemsProperty = BindableProperty.Create("FillItems", typeof(bool), typeof(GridView), default(bool));
+ /// <summary>
+ /// BindableProperty. Identifies the Orientation bindable property.
+ /// </summary>
public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(GridViewOrientation), typeof(GridView), GridViewOrientation.Vertical);
/// <summary>
/// </example>
public class LongTapGestureRecognizer : Element, IGestureRecognizer, ILongTapGestureController
{
+ /// <summary>
+ /// BindableProperty. Identifies the Timeout bindable property.
+ /// </summary>
public static readonly BindableProperty TimeoutProperty = BindableProperty.Create("Timeout", typeof(double), typeof(LongTapGestureRecognizer), default(double));
+ /// <summary>
+ /// BindableProperty. Identifies the TapStartedCommand bindable property.
+ /// </summary>
public static readonly BindableProperty TapStartedCommandProperty = BindableProperty.Create("TapStartedCommand", typeof(ICommand), typeof(LongTapGestureRecognizer), null);
+ /// <summary>
+ /// BindableProperty. Identifies the TapCompletedCommand bindable property.
+ /// </summary>
public static readonly BindableProperty TapCompletedCommandProperty = BindableProperty.Create("TapCompletedCommand", typeof(ICommand), typeof(LongTapGestureRecognizer), null);
+ /// <summary>
+ /// BindableProperty. Identifies the TapStartedCommandParameter bindable property.
+ /// </summary>
public static readonly BindableProperty TapStartedCommandParameterProperty = BindableProperty.Create("TapStartedCommandParameter", typeof(object), typeof(LongTapGestureRecognizer), null);
+ /// <summary>
+ /// BindableProperty. Identifies the TapCompletedCommandParameter bindable property.
+ /// </summary>
public static readonly BindableProperty TapCompletedCommandParameterProperty = BindableProperty.Create("TapCompletedCommandParameter", typeof(object), typeof(LongTapGestureRecognizer), null);
/// <summary>
{
internal static readonly BindablePropertyKey NativeViewPropertyKey = BindableProperty.CreateReadOnly("NativeView", typeof(object), typeof(MediaView), default(object));
+ /// <summary>
+ /// BindableProperty. Identifies the NativeView bindable property.
+ /// </summary>
public static readonly BindableProperty NativeViewProperty = NativeViewPropertyKey.BindableProperty;
/// <summary>
NativeViewCreated?.Invoke(this, EventArgs.Empty);
}
}
-}
+}
\ No newline at end of file
/// </example>
public class RadioButton : View
{
+ /// <summary>
+ /// BindableProperty. Identifies the Text bindable property.
+ /// </summary>
public static readonly BindableProperty TextProperty = BindableProperty.Create("Text", typeof(string), typeof(RadioButton), default(string));
+ /// <summary>
+ /// BindableProperty. Identifies the TextColor bindable property.
+ /// </summary>
public static readonly BindableProperty TextColorProperty = BindableProperty.Create("TextColor", typeof(Color), typeof(RadioButton), Color.Default);
+ /// <summary>
+ /// BindableProperty. Identifies the Font bindable property.
+ /// </summary>
public static readonly BindableProperty FontProperty = BindableProperty.Create("Font", typeof(Font), typeof(RadioButton), default(Font),
propertyChanged: FontStructPropertyChanged);
+ /// <summary>
+ /// BindableProperty. Identifies the FontFamily bindable property.
+ /// </summary>
public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create("FontFamily", typeof(string), typeof(RadioButton), default(string),
propertyChanged: SpecificFontPropertyChanged);
+ /// <summary>
+ /// BindableProperty. Identifies the FontSize bindable property.
+ /// </summary>
public static readonly BindableProperty FontSizeProperty = BindableProperty.Create("FontSize", typeof(double), typeof(RadioButton), -1.0,
propertyChanged: SpecificFontPropertyChanged,
defaultValueCreator: bindable => Device.GetNamedSize(NamedSize.Default, (RadioButton)bindable));
+ /// <summary>
+ /// BindableProperty. Identifies the FontAttributes bindable property.
+ /// </summary>
public static readonly BindableProperty FontAttributesProperty = BindableProperty.Create("FontAttributes", typeof(FontAttributes), typeof(RadioButton), FontAttributes.None,
propertyChanged: SpecificFontPropertyChanged);
+ /// <summary>
+ /// BindableProperty. Identifies the IsSelected bindable property.
+ /// </summary>
public static readonly BindableProperty IsSelectedProperty = BindableProperty.Create("IsSelected", typeof(bool), typeof(RadioButton), false,
propertyChanged: IsSelectedPropertyChanged);
+ /// <summary>
+ /// BindableProperty. Identifies the GroupName bindable property.
+ /// </summary>
public static readonly BindableProperty GroupNameProperty = BindableProperty.Create("GroupName", typeof(string), typeof(RadioButton), default(string));
/// <summary>
/// <summary>
/// Gets or sets the Color for the text of the RadioButton.
- /// This is a bindable property.
/// </summary>
public Color TextColor
{
/// <summary>
/// Gets or sets the Font for the RadioButton text.
- /// This is a bindable property.
/// </summary>
public Font Font
{
/// <summary>
/// Gets or sets the font family to which the font for the RadioButton text belongs.
- /// This is a bindable property.
/// </summary>
public string FontFamily
{
/// <summary>
/// Gets or sets the size of the font of the RadioButton text.
- /// This is a bindable property.
/// </summary>
public double FontSize
{
/// <summary>
/// Gets or sets a value that indicates whether the font for the RadioButton text is bold, italic, or neither.
- /// This is a bindable property.
/// </summary>
public FontAttributes FontAttributes
{
/// <summary>
/// Gets or sets the name that specifies which RadioButton controls are mutually exclusive.
- /// This is a bindable property.
/// It can be nullable.
/// </summary>
public string GroupName
/// <summary>
/// Gets or sets a Boolean value that indicates whether this RadioButton is selected.
- /// This is a bindable property.
/// </summary>
public bool IsSelected
{