Public Class ButtonTemplet Inherits UserControl Private mButtonText As String Public Property ButtonText As String Set(value As String) lblTitle.Text = value End Set Get Return lblTitle.Text End Get End Property Private Sub ButtonTemplet_MouseEnter(sender As System.Object, e As System.EventArgs) Handles MyBase.MouseEnter Me.BackgroundImage = Global.WindowsApplicationDemo.My.Resources.Resources.Clients_grey_button_Templet Me.lblTitle.ForeColor = Color.White End Sub Private Sub ButtonTemplet_MouseLeave(sender As System.Object, e As System.EventArgs) Handles MyBase.MouseLeave Me.BackgroundImage = Global.WindowsApplicationDemo.My.Resources.Resources.Orders_white_button_Templet Me.lblTitle.ForeColor = Color.Gray End Sub Protected Overrides Sub OnMouseEnter(e As System.EventArgs) MyBase.OnMouseEnter(e) Me.BackgroundImage = Global.WindowsApplicationDemo.My.Resources.Resources.Clients_grey_button_Templet Me.lblTitle.ForeColor = Color.White End Sub Protected Overrides Sub OnMouseLeave(e As System.EventArgs) MyBase.OnMouseLeave(e) Me.BackgroundImage = Global.WindowsApplicationDemo.My.Resources.Resources.Orders_white_button_Templet Me.lblTitle.ForeColor = Color.Gray End Sub End Class
Partial
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)