71 lines
2.5 KiB
C#
71 lines
2.5 KiB
C#
//-----------------------------------------------------------------------
|
|
// <copyright file="AddPersonButton.cs" company="BTU/IIT">
|
|
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
|
// </copyright>
|
|
// <author>Stubbfel</author>
|
|
// <date>15.10.2013</date>
|
|
// <summary>Implements the add person button class</summary>
|
|
//-----------------------------------------------------------------------
|
|
namespace CampusAppWP8.Utility.Lui.Button
|
|
{
|
|
using System;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Media.Imaging;
|
|
using CampusAppWP8.Resources;
|
|
|
|
/// <summary> Add person button. </summary>
|
|
/// <remarks> Stubbfel, 12.09.2013. </remarks>
|
|
/// <seealso cref="T:System.Windows.Controls.Button"/>
|
|
public class AddPersonButton : System.Windows.Controls.Button
|
|
{
|
|
#region Member
|
|
|
|
/// <summary> The person identifier property. </summary>
|
|
public static readonly DependencyProperty PersonIdProperty = DependencyProperty.Register("PersonID", typeof(object), typeof(AddPersonButton), new PropertyMetadata(false));
|
|
|
|
/// <summary> The function index property. </summary>
|
|
public static readonly DependencyProperty FunctionIndexProperty = DependencyProperty.Register("FunctionIndex", typeof(object), typeof(AddPersonButton), new PropertyMetadata(false));
|
|
|
|
/// <summary> The icon. </summary>
|
|
private static BitmapImage icon = new BitmapImage(new Uri(Icons.AddContact, UriKind.Relative));
|
|
|
|
#endregion
|
|
|
|
#region Constructor
|
|
|
|
/// <summary> Initializes a new instance of the AddPersonButton class. </summary>
|
|
/// <remarks> Stubbfel, 12.09.2013. </remarks>
|
|
public AddPersonButton()
|
|
: base()
|
|
{
|
|
this.Content = new Image
|
|
{
|
|
Source = icon
|
|
};
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property
|
|
|
|
/// <summary> Gets or sets the identifier of the person. </summary>
|
|
/// <value> The identifier of the person. </value>
|
|
public object PersonId
|
|
{
|
|
get { return (object)this.GetValue(PersonIdProperty); }
|
|
set { this.SetValue(PersonIdProperty, value); }
|
|
}
|
|
|
|
/// <summary> Gets or sets zero-based index of the function. </summary>
|
|
/// <value> The function index. </value>
|
|
public object FunctionIndex
|
|
{
|
|
get { return (object)this.GetValue(FunctionIndexProperty); }
|
|
set { this.SetValue(FunctionIndexProperty, value); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|