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