gxc
2019-10-29 081ea8d273048fd03756718ac6fb48a3c09218e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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 = 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);
        }
    }
}