黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
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
using System;
using System.Collections.Generic;
using System.Text;
 
namespace Shared.Phone
{
    /// <summary>
    /// 做成一个提示有新消息的角标控件(置于指定控件的右上角)
    /// </summary>
    public class InformationTipView : ButtonBase
    {
        /// <summary>
        /// 做成一个提示有新消息的角标控件(置于指定控件的右上角)
        /// </summary>
        /// <param name="TargetView">目标控件</param>
        /// <param name="size">角标大小</param>
        public InformationTipView(ButtonBase TargetView, int size = 30)
        {
            this.InitIconSize(size, size, true);
            this.BackgroundColor = UserCenterColor.Current.Red;
            this.Radius = (uint)this.GetPictrueRealSize(size) / 2;
            this.X = TargetView.X + TargetView.Width / 2 + Application.GetRealWidth(10);
            this.Y = TargetView.Y;
        }
    }
}