namespace TVApps.Controls
{
+ /// <summary>
+ /// A enumeration for AppItemCell icon size
+ /// </summary>
public enum IconSize
{
Normal = 0,
};
/// <summary>
- /// Custom Control for Apps List Item Template
+ /// A custom control for AppListView item template
/// </summary>
public partial class AppItemCell : ViewCell
{
/// <summary>
- /// The command will be excuted if the button is clicked
+ /// A command will be executed if the button is clicked
/// </summary>
public ICommand OnClickedCommand { get; set; }
/// <summary>
- /// The command will be excuted if the button is focused
+ /// A command will be executed if the button is focused
/// </summary>
public ICommand OnFocusedCommand { get; set; }
/// <summary>
- /// The property for pinned state
+ /// Identifies the IsPinned bindable property
/// </summary>
public static readonly BindableProperty IsPinnedProperty = BindableProperty.Create("IsPinned", typeof(bool), typeof(AppItemCell), default(bool));
+
+ /// <summary>
+ /// Gets or sets pin state of AppItemCell
+ /// </summary>
public bool IsPinned
{
get { return (bool)GetValue(IsPinnedProperty); }
}
/// <summary>
- /// The property for checked state
+ /// Identifies the IsChecked bindable property
/// </summary>
public static readonly BindableProperty IsCheckedProperty = BindableProperty.Create("IsChecked", typeof(bool), typeof(AppItemCell), default(bool));
+
+ /// <summary>
+ /// Gets or sets check state of AppItemCell
+ /// </summary>
public bool IsChecked
{
get { return (bool)GetValue(IsCheckedProperty); }
}
/// <summary>
- /// The property for show state of option menu
+ /// Identifies the IsShowOptions bindable property
/// </summary>
public static readonly BindableProperty IsShowOptionsProperty = BindableProperty.Create("IsShowOptions", typeof(bool), typeof(AppItemCell), default(bool));
+
+ /// <summary>
+ /// Gets or sets visible state of Option Menu
+ /// </summary>
public bool IsShowOptions
{
get { return (bool)GetValue(IsShowOptionsProperty); }
}
/// <summary>
- /// The property for dim state
+ /// Identifies the IsDim bindable property
/// </summary>
public static readonly BindableProperty IsDimProperty = BindableProperty.Create("IsDim", typeof(bool), typeof(AppItemCell), default(bool));
+
+ /// <summary>
+ /// Gets or sets dim state of AppItemCell
+ /// </summary>
public bool IsDim
{
get { return (bool)GetValue(IsDimProperty); }
}
/// <summary>
- /// The property for focused state
+ /// Identifies the IsFocused bindable property
/// </summary>
public static readonly BindableProperty IsFocusedProperty = BindableProperty.Create("IsFocused", typeof(bool), typeof(AppItemCell), default(bool), BindingMode.TwoWay);
+
+ /// <summary>
+ /// Gets or sets focus state of AppItemCell
+ /// </summary>
public bool IsFocused
{
get { return (bool)GetValue(IsFocusedProperty); }
}
/// <summary>
- /// Constructor
+ /// A constructor
+ /// Adds PropertyChanged event handler
/// </summary>
public AppItemCell()
{
}
/// <summary>
- /// Handles AppItemCell Property Changed event
+ /// This method is called when the properties of AppItemCell is changed
/// Runs animation according to property change of AppItemCell
/// </summary>
/// <param name="sender">The source of the event</param>
}
/// <summary>
- /// Changes positon and scale of ButtomImage and TextArea
+ /// A method changes position and scale of ButtomImage and TextArea
/// </summary>
- /// <param name="size">Icon Size for changing</param>
+ /// <param name="size">IconSize for change scale and position</param>
public void ChangeIconSize(IconSize size)
{
ButtonImage.ScaleTo((size == IconSize.Normal) ? 1.0 : 1.32, 50);
}
/// <summary>
- /// Shows option menu
+ /// A method shows or hides option menu according to parameter
/// </summary>
/// <param name="isShow">A flag indicates whether the option menu should be showed or not</param>
public void ShowOptionMenu(bool isShow)
}
/// <summary>
- /// Handles button title Property Changed event
+ /// This method is called when the properties of TextArea is changed
/// </summary>
/// <param name="sender">The source of the event</param>
/// <param name="e">The event that is occurred when property of ButtonTitle is changed</param>
}
/// <summary>
- /// Handles Button Clicked event
+ /// This method is called when the AppItemCell is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
/// <param name="e">The event that is occurred when button is clicked</param>
}
/// <summary>
- /// Handles Button Focused event
+ /// This method is called when the AppItemCell receives focus
/// </summary>
/// <param name="sender">The source of the event</param>
/// <param name="e">The event that is occurred when button is focused</param>
}
/// <summary>
- /// Handles Button Unfocused event
+ /// This method is called when the AppItemCell loses focus
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occured when button is unfocused</param>
+ /// <param name="e">The event that is occurred when button is unfocused</param>
private void OnUnFocused(object sender, EventArgs e)
{
IsFocused = false;
namespace TVApps.Controls
{
/// <summary>
- /// TV Apps Custom ListView
+ /// A custom control for list in TV Apps
/// </summary>
public partial class AppListView : ScrollView
{
+
/// <summary>
- /// The property for source of list items
+ /// Identifies the ItemsSource bindable property
/// </summary>
public static readonly BindableProperty ItemsSourceProperty = BindableProperty.Create("ItemsSource", typeof(IEnumerable<ShortcutInfo>), typeof(AppListView), default(IEnumerable<ShortcutInfo>));
+
+ /// <summary>
+ /// Gets or sets source of list items
+ /// </summary>
public IEnumerable<ShortcutInfo> ItemsSource
{
get { return (IEnumerable<ShortcutInfo>)GetValue(ItemsSourceProperty); }
}
/// <summary>
- /// The property for template of list items
+ /// Identifies the ItemTemplate bindable property
/// </summary>
public static readonly BindableProperty ItemTemplateProperty = BindableProperty.Create("ItemTemplate", typeof(DataTemplate), typeof(AppListView), default(DataTemplate));
+
+ /// <summary>
+ /// Gets or sets template of list items
+ /// </summary>
public DataTemplate ItemTemplate
{
get { return (DataTemplate)GetValue(ItemTemplateProperty); }
}
/// <summary>
- /// The total count of items in list
+ /// A count of items in list
/// </summary>
private int AppCount;
/// <summary>
- /// Checks first item in list is focused
+ /// A flag indicates whether first item in list is focused or not
/// </summary>
public bool IsFirstItemFocused
{
}
/// <summary>
- /// Constructor
+ /// A constructor
+ /// Adds PropertyChanged event handler
/// </summary>
public AppListView()
{
InitializeComponent();
AppCount = 0;
- PropertyChanged += OnPropertyChanged;
+ PropertyChanged += AppListViewPropertyChanged;
}
/// <summary>
- /// Handles AppListView Property Changed event
+ /// This method is called when the properties of AppListView is changed
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occured when property of AppListView is changed</param>
- void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ /// <param name="e">The event that is occurred when property of AppListView is changed</param>
+ void AppListViewPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "ItemsSource" || e.PropertyName == "ItemTemplate")
{
}
/// <summary>
- /// Creates and Adds AppItemCells binded with ItemsSource
+ /// A method creates and adds AppItemCells binded with ItemsSource
/// </summary>
void CreateAppItemCells()
{
}
/// <summary>
- /// Scrolls the list with spacing
+ /// A method scrolls the list with spacing
/// </summary>
- /// <param name="index">The index of focused item cell</param>
+ /// <param name="index">A index of focused item cell</param>
private async void ScrollToIndex(int index)
{
if (AppUpperList.Children.Count > index)
}
/// <summary>
- /// Focusing Initialize
- /// Focus first item in apps list
+ /// A method moves focus to first item in list
/// </summary>
public void InitializeFocus()
{
namespace TVApps.Controls
{
/// <summary>
- /// Custom Button for TVButton to get pressed/release status
+ /// A custom control for TVButton to get pressed/release status
/// </summary>
public partial class CustomButton : Button
{
/// <summary>
- /// The event handler for button released event
+ /// A event handler for button released event
/// </summary>
public EventHandler OnButtonUp;
/// <summary>
- /// The event handler for button pressed event
+ /// A event handler for button pressed event
/// </summary>
public EventHandler OnButtonDown;
/// <summary>
- /// Constructor
+ /// A constructor
/// </summary>
public CustomButton()
{
{
/// <summary>
- /// Custom Control for Nine Patch Image
+ /// A custom control for displaying nine patch image
/// </summary>
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class NinePatchImage : Image
{
/// <summary>
- /// The property for left border of image
+ /// Identifies the BorderLeft bindable property
/// </summary>
public static readonly BindableProperty BorderLeftProperty = BindableProperty.Create("BorderLeft", typeof(int), typeof(NinePatchImage), default(int));
+
+ /// <summary>
+ /// Gets or sets left border of NinePatchImage
+ /// </summary>
public int BorderLeft
{
get { return (int)GetValue(BorderLeftProperty); }
}
/// <summary>
- /// The property for right border of image
+ /// Identifies the BorderRight bindable property
/// </summary>
public static readonly BindableProperty BorderRightProperty = BindableProperty.Create("BorderRight", typeof(int), typeof(NinePatchImage), default(int));
+
+ /// <summary>
+ /// Gets or sets right border of NinePatchImage
+ /// </summary>
public int BorderRight
{
get { return (int)GetValue(BorderRightProperty); }
}
/// <summary>
- /// The property for top border of image
+ /// Identifies the BorderTop bindable property
/// </summary>
public static readonly BindableProperty BorderTopProperty = BindableProperty.Create("BorderTop", typeof(int), typeof(NinePatchImage), default(int));
+
+ /// <summary>
+ /// Gets or sets top border of NinePatchImage
+ /// </summary>
public int BorderTop
{
get { return (int)GetValue(BorderTopProperty); }
}
/// <summary>
- /// The property for bottom border of image
+ /// Identifies the BorderBottom bindable property
/// </summary>
public static readonly BindableProperty BorderBottomProperty = BindableProperty.Create("BorderBottom", typeof(int), typeof(NinePatchImage), default(int));
+
+ /// <summary>
+ /// Gets or sets bottom border of NinePatchImage
+ /// </summary>
public int BorderBottom
{
get { return (int)GetValue(BorderBottomProperty); }
}
/// <summary>
- /// Constructor
+ /// A constructor
/// </summary>
public NinePatchImage()
{
namespace TVApps.Controls
{
/// <summary>
- /// TV Button Control
+ /// A custom control for buttons in footer of TV Apps
/// </summary>
public partial class TVButton : StackLayout
{
/// <summary>
- /// The title of TVButton
+ /// Gets or sets text of TVButton
/// </summary>
public string Text
{
}
/// <summary>
- /// The bindable property for command
+ /// Identifies the Command bindable property
/// </summary>
- /// <see cref="Command"/>
- public static readonly BindableProperty CommandProperty =
- BindableProperty.Create(nameof(Command), typeof(ICommand), typeof(TVButton), null, BindingMode.TwoWay);
+ public static readonly BindableProperty CommandProperty = BindableProperty.Create(nameof(Command), typeof(ICommand), typeof(TVButton), null, BindingMode.TwoWay);
/// <summary>
- /// A command will be executed if the button is touched.
+ /// Gets or sets command of TV Button
+ /// The command will be executed if the button is touched
/// </summary>
public ICommand Command
{
}
/// <summary>
- /// A command parameter will be passed when the Command is executed.
+ /// A command parameter will be passed when the Command is executed
/// </summary>
/// <see cref="CommandButton.Command"/>
public string CommandParameter
}
/// <summary>
- /// Handles Button Clicked event
+ /// This method is called when the TVButton is clicked
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occured when button is clicked</param>
+ /// <param name="e">The event that is occurred when button is clicked</param>
private void ButtonClickListener(object sender, EventArgs e)
{
// Stops playing animation
}
/// <summary>
- /// Handles Button Focused event
+ /// This method is called when the TVButton receives focus
/// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The event that is occured when button is focused</param>
+ /// <param name="sender">The source of the event</param>
+ /// <param name="e">The event that is occurred when button is focused</param>
private void ButtonFocusedListener(object sender, FocusEventArgs e)
{
// Stops playing animation
}
/// <summary>
- /// Handles Button Unfocused event
+ /// This method is called when the TVButton loses focus
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occured when button is unfocused</param>
+ /// <param name="e">The event that is occurred when button is unfocused</param>
private void ButtonUnfocusedListener(object sender, FocusEventArgs e)
{
// Stops playing animation
}
/// <summary>
- /// Handles Button Up event
+ /// This method is called when the TVButton is released
/// </summary>
/// <param name="sender">The event sender</param>
- /// <param name="e">The event that is occured when button is released</param>
+ /// <param name="e">The event that is occurred when button is released</param>
public void ButtonUpListener(object sender, EventArgs e)
{
BackgroundImage.Source = ButtonImageReleased;
}
/// <summary>
- /// Handles Button Down event
+ /// This method is called when the TVButton is pressed
/// </summary>
/// <param name="sender">The source of the event</param>
- /// <param name="e">The event that is occured when button is pressed</param>
+ /// <param name="e">The event that is occurred when button is pressed</param>
public void ButtonDownListener(object sender, EventArgs e)
{
BackgroundImage.Source = ButtonImagePressed;
}
/// <summary>
- /// Positions and Sizes the children
+ /// A method positions and sizes the children
/// </summary>
/// <param name="x">The x position for the children</param>
/// <param name="y">The y position for the children</param>