New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | |
|
| | | namespace Shared.Phone.UserCenter
|
| | | {
|
| | | /// <summary>
|
| | | /// 做成一个加大点击区域的图标控件
|
| | | /// </summary>
|
| | | public class IconBigViewControl : FrameLayoutStatuControl
|
| | | {
|
| | | /// <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>
|
| | | /// X轴的真实偏移量(请确保已经调用InitControl初始化函数,用法:蓝湖上的X轴,减掉这个值即可)
|
| | | /// </summary>
|
| | | public int XOffset
|
| | | {
|
| | | get { return (this.Width - btnIcon.Width) / 2; }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// Y轴的真实偏移量(请确保已经调用InitControl初始化函数,用法:蓝湖上的Y轴,减掉这个值即可)
|
| | | /// </summary>
|
| | | public int YOffset
|
| | | {
|
| | | get { return (this.Height - btnIcon.Height) / 2; }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 做成一个加大点击区域的图标控件
|
| | | /// </summary>
|
| | | /// <param name="i_width">控件空度</param>
|
| | | /// <param name="i_height">控件高度</param>
|
| | | public IconBigViewControl(int i_width, int i_height)
|
| | | {
|
| | | this.Width = this.GetPictrueRealSize(110);
|
| | | this.Height = this.GetPictrueRealSize(110);
|
| | |
|
| | | this.btnIcon = new IconControlCommon();
|
| | | btnIcon.Width = this.GetPictrueRealSize(i_width);
|
| | | btnIcon.Height = this.GetPictrueRealSize(i_height);
|
| | | btnIcon.Gravity = Gravity.Center;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化
|
| | | /// </summary>
|
| | | public void InitControl()
|
| | | {
|
| | | this.AddChidren(btnIcon, ChidrenBindMode.BindEvent);
|
| | | }
|
| | | }
|
| | | }
|