Popup
Overview
Features
Customize Trigger
Please select the Trigger properties, to change whenever the Popup will show or hidden.
Settings
Description
Popups may have owner elements that can be used to control their visibility. The show-trigger and hide-trigger attributes determine whether the Popups should be shown or hidden when the owner element is clicked or when the popup loses the focus.
IsResizable: Gets or sets a value that determines whether the popup can be resized by dragging its edges with the mouse.
IsDraggable: Gets or sets a value that determines whether the popup can be dragged with the mouse by its header. The header is identified by the '.wj-dialog-header' or '.modal-header' CSS selectors. If the dialog does not contain any elements with the 'wj-dialog-header'or 'modal-header' classes, users will not be able to drag the popup.
OnClientDragged: Gets or sets the client function which occurs after the Popup has been dragged.
OnClientDragging: Gets or sets the client function which occurs when the Popup is about to be dragged.
OnClientPositionChanged: Gets or sets the client function which occurs while the user moves the Popup, between the Dragging and Dragged events, after the PositionChanging event.
OnClientPositionChanging: Gets or sets the client function which occurs while the user moves the Popup, between the Dragging and Dragged events.
OnClientResized: Gets or sets the client function which occurs after the Popup has been resized.
OnClientResizing: Gets or sets the client function which occurs when the Popup is about to be resized.
OnClientSizeChanged: Gets or sets the client function which occurs while the user resizes the Popup, between the resizing and resized events, after the SizeChanging event.
OnClientSizeChanging: Gets or sets the client function which occurs while the user resizes the Popup, between the resizing and resized events.
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 | using Microsoft.AspNetCore.Mvc; using System; using MvcExplorer.Models; using System.Collections.Generic; using C1.Web.Mvc; using System.Linq; namespace MvcExplorer.Controllers { public partial class PopupController : Controller { public ActionResult Index() { var settings = new ClientSettingsModel { Settings = new Dictionary< string , object []> { { "ShowTrigger" , Enum.GetValues( typeof (PopupTrigger)).Cast< object >().ToArray()}, { "HideTrigger" , Enum.GetValues( typeof (PopupTrigger)).Cast< object >().ToArray()} } }; settings.LoadRequestData(Request); ViewBag.DemoSettingsModel = settings; return View(); } } } |
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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | @ { ViewBag.DemoSettings = true ; ClientSettingsModel settings = ViewBag.DemoSettingsModel; } @section Styles{ < style > .btn { height: auto; } .popover { display: block; } .tab-content > .tab-pane { display: block; } </ style > } < label > @Html .Raw(PopupRes.Index_Text2)</ label > <!-- The popup owners. --> < button id = "btn1" type = "button" class = "btn btn-default" > @Html .Raw(PopupRes.Index_ClickToShowPopupForm) < br > < small > @Html .Raw(PopupRes.Index_Description1)</ small > </ button > < button id = "btn2" type = "button" class = "btn btn-default" > @Html .Raw(PopupRes.Index_ClickToShowPopupForm) < br > < small > @Html .Raw(PopupRes.Index_Description2)</ small > </ button > < button id = "btn3" type = "button" class = "btn btn-default" > @Html .Raw(PopupRes.Index_ClickToShowPopupForm) < br > < small >( @Html .Raw(PopupRes.Index_Description3)</ small > </ button > < button id = "eventPopupBtn" type = "button" class = "btn btn-default" > @Html .Raw(PopupRes.Index_ClickToShowPopupWithEvents) < br > < small >(ShowTrigger=Click, HideTrigger=Click, IsResizable=True, IsDraggable=True)</ small > </ button > < br /> < br /> < strong style = "color:red" > @Html .Raw(PopupRes.Index_Title4)</ strong > < br /> < p style = "color:red" > @Html .Raw(PopupRes.Index_Description5)</ p > < button id = "btn4" type = "button" class = "btn btn-default" > < small >( @Html .Raw(PopupRes.Index_Description4)</ small > </ button > < br /> < br /> < br /> < c1-popup class = "popover" style = "display:none;" id = "popup1" owner = "#btn1" hide-trigger = "Click" is-resizable = "true" > < h3 class = "popover-title" > @Html .Raw(PopupRes.Index_Title) </ h3 > < div class = "popover-content" > @Html .Raw(PopupRes.Index_Text0) </ div > </ c1-popup > < c1-popup class = "popover" style = "display:none;" id = "popup2" owner = "#btn2" hide-trigger = "Blur" > < h3 class = "popover-title" > @Html .Raw(PopupRes.Index_Title) </ h3 > < div class = "popover-content" > @Html .Raw(PopupRes.Index_Text0) </ div > </ c1-popup > < c1-popup class = "popover" style = "display:none;" id = "popup3" owner = "#btn3" hide-trigger = "None" > < h3 class = "popover-title" > @Html .Raw(PopupRes.Index_Title) </ h3 > < div class = "popover-content " > < form name = "popoverForm" > < p > @Html .Raw(PopupRes.Index_Text0)</ p > < pre >2 + 3 = < span class = "" >5</ span ></ pre > < div class = "form-group" > < div class = "input-group" > < div class = "input-group-addon" > @@</div> < input class = "form-control" type = "email" placeholder = "@PopupRes.Index_EnterEmail" > </ div > </ div > < div class = "form-actions" > < button type = "button" class = "btn btn-danger wj-hide" > @Html .Raw(PopupRes.Index_Close)</ button > < button type = "button" class = "btn btn-primary wj-hide" > @Html .Raw(PopupRes.Index_SaveChanges)</ button > </ div > </ form > </ div > </ c1-popup > < c1-popup class = "popover" style = "display:none;" id = "eventPopup" owner = "#eventPopupBtn" show-trigger = "Click" hide-trigger = "Click" is-resizable = "true" is-draggable = "true" dragging = "onDragging" dragged = "onDragged" position-changing = "onPositionChanging" position-changed = "onPositionChanged" resizing = "onResizing" resized = "onResized" size-changing = "onSizeChanging" size-changed = "onSizeChanged" > < h3 class = "wj-dialog-header" style = "margin:0" > @Html .Raw(PopupRes.Index_Title) </ h3 > < div class = "popover-content" > < div class = "container" > < ul > < li >onDragging</ li > < li >onDragged</ li > < li >onPositionChanging</ li > < li >onPositionChanged</ li > < li >onResizing</ li > < li >onResized</ li > < li >onSizeChanging</ li > < li >onSizeChanged</ li > </ ul > </ div > </ div > </ c1-popup > < c1-popup class = "popover" style = "display:none;" id = "popup4" owner = "#btn4" show-trigger = "None" hide-trigger = "None" > < h3 class = "popover-title" > @Html .Raw(PopupRes.Index_Title) </ h3 > < div class = "popover-content" > @Html .Raw(PopupRes.Index_Text0) </ div > </ c1-popup > @section Scripts{ <script> function setProperty(property, value) { var control = wijmo.Control.getControl( '#popup4' ); if (control) { control[property] = value; } } function customChangeShowTrigger(popup, value) { setProperty( 'showTrigger' , value); } function customChangeHideTrigger(popup, value) { setProperty( 'hideTrigger' , value); } //events function onDragging() { console.log( "onDragging!!!" ) } function onDragged() { console.log( "onDragged!!!" ) } function onPositionChanging() { console.log( "onPositionChanging!!!" ) } function onPositionChanged() { console.log( "onPositionChanged!!!" ) } function onResizing() { console.log( "onResizing!!!" ) } function onResized() { console.log( "onResized!!!" ) } function onSizeChanging() { console.log( "onSizeChanging!!!" ) } function onSizeChanged() { console.log( "onSizeChanged!!!" ) } </script> } @section Description{ < p > @Html .Raw(PopupRes.Index_Text1)</ p > < p > @Html .Raw(PopupRes.Index_Text3)</ p > < p > @Html .Raw(PopupRes.Index_IsDraggable_Description)</ p > < p > @Html .Raw(PopupRes.Index_OnClientDragged_Description) < br /> @Html .Raw(PopupRes.Index_OnClientDragging_Description) < br /> @Html .Raw(PopupRes.Index_OnClientPositionChanged_Description) < br /> @Html .Raw(PopupRes.Index_OnClientPositionChanging_Description) < br /> @Html .Raw(PopupRes.Index_OnClientResized_Description) < br /> @Html .Raw(PopupRes.Index_OnClientResizing_Description) < br /> @Html .Raw(PopupRes.Index_OnClientSizeChanged_Description) < br /> @Html .Raw(PopupRes.Index_OnClientSizeChanging_Description) </ p > } |