user-controls

Parsing UnregisterHotkey from usercontrol to parent form

家住魔仙堡 提交于 2021-02-17 06:33:31
问题 So I'm attempting to get the userinputs when someone presses hotkeys, also outside the form (in this case SHIFT+A). Now since I wanted to add tabs to my forms application I decided to go with usercontrols, now the problem is, that I am unable to access the formclosing event (from form1) on the usercontrol, meaning I would have to somehow parse whatever I wanted to execute in the formclosing event. Usercontrol (named home) public partial class Home : UserControl { [System.Runtime

Parsing UnregisterHotkey from usercontrol to parent form

こ雲淡風輕ζ 提交于 2021-02-17 06:33:20
问题 So I'm attempting to get the userinputs when someone presses hotkeys, also outside the form (in this case SHIFT+A). Now since I wanted to add tabs to my forms application I decided to go with usercontrols, now the problem is, that I am unable to access the formclosing event (from form1) on the usercontrol, meaning I would have to somehow parse whatever I wanted to execute in the formclosing event. Usercontrol (named home) public partial class Home : UserControl { [System.Runtime

Only one instance of a ScriptManager can be added to the page in asp.net

穿精又带淫゛_ 提交于 2021-02-16 13:08:46
问题 When I'm trying to add user control I got this error Only one instance of a ScriptManager can be added to the page Code: .ascx <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VisaUserControl.ascx.cs" Inherits="Portal.VisaUserControl" %> <%@ Register Assembly="BasicFrame.WebControls.BasicDatePicker" Namespace="BasicFrame.WebControls" TagPrefix="dp" %> <asp:ScriptManager ID="scriptmanager1" runat="server"></asp:ScriptManager> <div id="divreg" runat="server"> <table id="tbl" runat=

Only one instance of a ScriptManager can be added to the page in asp.net

牧云@^-^@ 提交于 2021-02-16 13:06:28
问题 When I'm trying to add user control I got this error Only one instance of a ScriptManager can be added to the page Code: .ascx <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VisaUserControl.ascx.cs" Inherits="Portal.VisaUserControl" %> <%@ Register Assembly="BasicFrame.WebControls.BasicDatePicker" Namespace="BasicFrame.WebControls" TagPrefix="dp" %> <asp:ScriptManager ID="scriptmanager1" runat="server"></asp:ScriptManager> <div id="divreg" runat="server"> <table id="tbl" runat=

Only one instance of a ScriptManager can be added to the page in asp.net

£可爱£侵袭症+ 提交于 2021-02-16 13:03:53
问题 When I'm trying to add user control I got this error Only one instance of a ScriptManager can be added to the page Code: .ascx <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VisaUserControl.ascx.cs" Inherits="Portal.VisaUserControl" %> <%@ Register Assembly="BasicFrame.WebControls.BasicDatePicker" Namespace="BasicFrame.WebControls" TagPrefix="dp" %> <asp:ScriptManager ID="scriptmanager1" runat="server"></asp:ScriptManager> <div id="divreg" runat="server"> <table id="tbl" runat=

How to bind collection dependency property in UserControl

回眸只為那壹抹淺笑 提交于 2021-02-10 12:31:10
问题 This is not a duplicate! When I failed I tried to look to similar posts but without success. I cannot understand why OnUCItemsSourceChanged is not called? I'm pretty sure that I miss something simple but I cannot find it. I have Window that contains UserControl1 which has attached collection property that is bound to Window 's WindowCollection collection. I expect UserControl1.OnUCItemsSourceChanged to be called when I add items to WindowCollection . But it doesn't happen. What I miss?

Add a list of self created web user controls to a listview in codebehind fails

邮差的信 提交于 2021-02-10 07:38:06
问题 I have a listview which I would like to fill with self created user controls.But the problem is that the properties in the user control is not set. The usercontrols are displayed but the property values I enter is not set. Why is that? Here is the aspx code. <div id="productView" class="productsMain"> <div id="groupHeader" class="productsGroupHeader"> <asp:Label ID="lblGroupHeader" runat="server" Text="Gruppe" /> </div> <asp:ListView ID="pListView" runat="server"> <LayoutTemplate> <ul class=

Limit resizable dimensions of a custom control (c# .net)

被刻印的时光 ゝ 提交于 2021-02-10 03:16:36
问题 I am making a user control in MS Visual C#, and there is one thing that I just can't find an answer to: How do I limit which dimensions a control can be resized in during design view? For a clear example of what I'm asking, the built in TrackBar control can only only be made wider, not taller, and only displays the resizing squares on the left and right in design mode. Is there a way to replicate this for a user control? I have tried setting MinimumSize and MaximumSize values in the designer

Limit resizable dimensions of a custom control (c# .net)

北战南征 提交于 2021-02-10 03:07:38
问题 I am making a user control in MS Visual C#, and there is one thing that I just can't find an answer to: How do I limit which dimensions a control can be resized in during design view? For a clear example of what I'm asking, the built in TrackBar control can only only be made wider, not taller, and only displays the resizing squares on the left and right in design mode. Is there a way to replicate this for a user control? I have tried setting MinimumSize and MaximumSize values in the designer

Limit resizable dimensions of a custom control (c# .net)

非 Y 不嫁゛ 提交于 2021-02-10 03:05:41
问题 I am making a user control in MS Visual C#, and there is one thing that I just can't find an answer to: How do I limit which dimensions a control can be resized in during design view? For a clear example of what I'm asking, the built in TrackBar control can only only be made wider, not taller, and only displays the resizing squares on the left and right in design mode. Is there a way to replicate this for a user control? I have tried setting MinimumSize and MaximumSize values in the designer