Jan 21, 2016, 4:05 PM
Declare Click Event for Button created in Code Behind
Hello, I am creating a custom notification for the user when he enters my application, which has docked Items.
This is my code
Thanks!
This is my code
X.Msg.Notify(new NotificationConfig()
{
Title = "Bienvenido " + user.FirstName + " " + user.LastName,
Height = 300,
Width = 400,
CloseVisible = true,
Closable = true,
AutoHide = true,
HideDelay = 30000,
Icon = Icon.Note, PinEvent = "MouseOver",
DockedItems = {
new Label { MarginSpec = "25 0 0 0", Html = "<span style='font-size:18px'>Pestaña 'Dashboard' muestra número de sábanas solicitadas por mes</span>", Icon= Icon.ChartBar, IconAlign = Ext.Net.Alignment.Left },
new Button { UI=UI.Danger, Text="Ya no quiero ver este mensaje", Icon = Icon.ApplicationCascade, ClickEvent = "NoMoreButton"}
}
}).Show();
And I have my method private void NoMoreButton()
{
X.Msg.Notify("HOLA", "AMIGO").Show();
// SOME MORE CODE
}
But this is not working... I am using properly the 'Click Event' property for my button when creating it ? I would appreciate help on how can I 'link' my method to this button created in code.Thanks!