using System;
|
using System.Collections.Generic;
|
using System.Text;
|
|
namespace Shared.Phone
|
{
|
/// <summary>
|
/// 做成一个TopFrameLayout的返回键✩
|
/// </summary>
|
public class BackViewControl : FrameLayoutStatuControl
|
{
|
/// <summary>
|
/// 图标宽度
|
/// </summary>
|
private int iconWidth = 30;
|
|
/// <summary>
|
/// 做成一个TopFrameLayout的返回键✩
|
/// </summary>
|
public BackViewControl()
|
{
|
this.UseClickStatu = false;
|
this.Name = "btnBack";
|
this.X = HdlControlResourse.XXLeft - Application.GetRealWidth((110 - iconWidth) / 2);
|
this.Width = this.GetPictrueRealSize(110);
|
this.Height = this.GetPictrueRealSize(110);
|
this.Gravity = Gravity.CenterVertical;
|
}
|
|
/// <summary>
|
/// 初始化
|
/// </summary>
|
public void InitControl()
|
{
|
var btnIcon = new ButtonBase();
|
btnIcon.Width = this.GetPictrueRealSize(30);
|
btnIcon.Height = this.GetPictrueRealSize(51);
|
btnIcon.UnSelectedImagePath = "Item/Back.png";
|
btnIcon.Gravity = Gravity.Center;
|
|
this.AddChidren(btnIcon, ChidrenBindMode.BindEvent);
|
//这张图片好像很特殊,无法居中
|
btnIcon.Y += Application.GetRealHeight(5);
|
}
|
}
|
}
|