using System;
|
using System.Collections.Generic;
|
using System.Text;
|
|
namespace Shared.Phone.UserCenter
|
{
|
/// <summary>
|
/// 做成放在画面右边的的图标控件(注意,它不能用来做【向右】的图标)
|
/// </summary>
|
public class MostRightIconControl : FrameLayoutControl
|
{
|
/// <summary>
|
/// 图标控件(迫不得己,这个东西开放出去)
|
/// </summary>
|
public IconControlCommon btnIcon = null;
|
/// <summary>
|
/// UnSelectedImagePath
|
/// </summary>
|
public string UnSelectedImagePath
|
{
|
get { return btnIcon.UnSelectedImagePath; }
|
set { btnIcon.UnSelectedImagePath = value; }
|
}
|
/// <summary>
|
/// SelectedImagePath
|
/// </summary>
|
public string SelectedImagePath
|
{
|
get { return btnIcon.SelectedImagePath; }
|
set { btnIcon.SelectedImagePath = value; }
|
}
|
/// <summary>
|
/// IsSelected
|
/// </summary>
|
public bool IsSelected
|
{
|
get { return btnIcon.IsSelected; }
|
set { btnIcon.IsSelected = value; }
|
}
|
|
/// <summary>
|
/// 做成放在画面右边的的图标控件(注意,它不能用来做【向右】的图标)
|
/// </summary>
|
/// <param name="i_width">控件空度</param>
|
/// <param name="i_height">控件高度</param>
|
public MostRightIconControl(int i_width, int i_height)
|
{
|
this.Width = Application.GetMinRealAverage(110);
|
this.Height = this.Parent != null ? this.Parent.Height : ControlCommonResourse.ListViewRowHeight;
|
this.Gravity = Gravity.CenterVertical;
|
|
var XX = Application.CurrentWidth - Application.GetMinRealAverage(i_width) - ControlCommonResourse.XXLeft;
|
this.X = XX - Application.GetMinRealAverage((110 - i_width) / 2);
|
|
this.btnIcon = new IconControlCommon();
|
btnIcon.Width = Application.GetMinRealAverage(i_width);
|
btnIcon.Height = Application.GetMinRealAverage(i_height);
|
btnIcon.Gravity = Gravity.Center;
|
}
|
|
/// <summary>
|
/// 初始化
|
/// </summary>
|
public void InitControl()
|
{
|
this.AddChidren(btnIcon, ChidrenBindMode.BindEventOnly);
|
}
|
}
|
}
|