| | |
| | | this.BackgroundColor = 0x00000000; |
| | | } |
| | | |
| | | public Button btnImage = new Button |
| | | public ImageView btnImage = new ImageView |
| | | { |
| | | Height = Application.GetRealHeight(140), |
| | | Width = Application.GetRealWidth(109), |
| | | Radius = (uint)Application.GetRealHeight(12), |
| | | //UnSelectedImagePath = "Collection/CollectionGrayIcon.png", |
| | | BackgroundColor=0xff765876, |
| | | }; |
| | | |
| | | public Button btnScore = new Button |
| | |
| | | TextColor = MusicColor.WhiteColor, |
| | | TextSize = TextSize.Text16, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | IsBold=true, |
| | | }; |
| | | |
| | | public Button btnName = new Button |
| | |
| | | Height = Application.GetRealHeight(20), |
| | | TextSize = TextSize.Text14, |
| | | TextColor = MusicColor.TextColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | Padding = new Padding(0, 4, 0, 4), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Padding = new Padding(0, 0, 0, 0), |
| | | IsMoreLines = true, |
| | | }; |
| | | |
| | |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | //this.BackgroundColor = 0x00000000; |
| | | |
| | | //弹起来还原背景颜色 |
| | | action?.Invoke(this); |
| | | }; |
| | | this.MouseUpEventHandler += UpClick; |
| | | btnImage.MouseUpEventHandler += UpClick; |
| | |
| | | btnName.MouseUpEventHandler += UpClick; |
| | | |
| | | |
| | | //EventHandler<MouseEventArgs> MoveClick = (sender, e) => |
| | | //{ |
| | | // this.BackgroundColor = 0x00000000; |
| | | // //弹起来还原背景颜色 |
| | | //}; |
| | | //this.MouseMoveEventHandler += MoveClick; |
| | | //btnImage.MouseMoveEventHandler += MoveClick; |
| | | //btnName.MouseMoveEventHandler += MoveClick; |
| | | EventHandler<MouseEventArgs> CancelClick = (sender, e) => |
| | | { |
| | | //this.BackgroundColor = 0x00000000; |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | this.MouseUpOutsideEventHandler += CancelClick; |
| | | btnImage.MouseUpOutsideEventHandler += CancelClick; |
| | | btnScore.MouseUpOutsideEventHandler += CancelClick; |
| | | btnName.MouseUpOutsideEventHandler += CancelClick; |
| | | |
| | | EventHandler<MouseEventArgs> DownClick = (sender, e) => |
| | | { |
| | | //按下去改变背景颜色 |
| | | //this.BackgroundColor = 0xff454635; |
| | | action?.Invoke(this); |
| | | //this.BackgroundColor = AksCommonMethod.seleBackgroundColor; |
| | | |
| | | }; |
| | | this.MouseUpEventHandler += DownClick; |
| | | btnImage.MouseUpEventHandler += DownClick; |