using System;
using System.Collections.Generic;
using System.Text;
namespace Shared.Phone
{
///
/// 做成一个TopFrameLayout的返回键✩
///
public class BackViewControl : FrameLayoutStatuControl
{
///
/// 图标宽度
///
private int iconWidth = 30;
///
/// 做成一个TopFrameLayout的返回键✩
///
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;
}
///
/// 初始化
///
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);
}
}
}