Questions tagged [user-controls]

A UserControl is a separate, reusable input control that allows a user to interact with an application. User controls can be buttons, checkboxes, input text boxes, mice, keyboards, etc.

A UserControl is a separate, reusable input control that allows a user to interact with an application. User controls can be buttons, checkboxes, input text boxes, mice, keyboards, etc.

User controls only exist on graphical systems or applications. For example, a HTTP service application does not contain user controls; its input is usually by means of a configuration file or a separate application providing it input.

10278 questions
3
votes
2 answers

VBA Access 2003 Only Allow Press Button Once Within Reasonable Amount Of Time

I have a button on a form that takes the RowSource from a listbox on my form, creates an Excel, Worksheet and Query Table object, queries the information into excel and then formats it all. The problem is that if the user presses the mouse button…
Elias
  • 2,602
  • 5
  • 28
  • 57
3
votes
2 answers

Setting ItemTemplate of ItemsControl residing in UserControl

I have a UserControl consisting of some buttons and an ItemsControl. In the window using this control I want to set the ItemTemplate for this ItemsControl. How can I achieve this? UserControl:
MTR
  • 1,690
  • 3
  • 20
  • 47
3
votes
3 answers

WPF: How to accept both string and FrameworkElement in dependency property (like wpf Label does)?

I am creating a custom WPF control that should have several content slots. I'd like the user to be able to use either string, or a FrameworkElement as a value of property, for example:
Tomáš Kafka
  • 4,405
  • 6
  • 39
  • 52
3
votes
3 answers

Set Properties of User Control on Event Using FindControl

I have a user control that is dynamically loaded in the the page load: protected void Page_Load(object sender, EventArgs e) { MyControl ctl = (MyControl)LoadControl(controlPath); ctl.ID = "mycontrol"; …
maembe
  • 1,270
  • 1
  • 13
  • 25
3
votes
2 answers

How to force a certain UserControl design

I am writing a Base UserControl, that will be inherited by a bunch of other UserControls. I need to enforce a certain design for all these descendant controls (e.g. a couple of buttons must be on the top along with a label or two). The rest of the…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
3
votes
3 answers

Asp.Net - User Control Button OnClick Event Not Firing

I have a user control that is loaded only in certain instances, for example, when a user clicks a button on the page the following happens: MyControl ctl = (MyControl)LoadControl(controlPath); this.MyFormControl.Add(ctl); The user control that is…
maembe
  • 1,270
  • 1
  • 13
  • 25
3
votes
3 answers

MVC Razor DatePicker and TimePicker

I have a form generated by Razor that allows users to edit some scheduler data, and it works fairly well. One thing that I do not understand, nor have I seen before, are the Date and Time pickers that are automatically generated by Razor. To…
keeehlan
  • 7,874
  • 16
  • 56
  • 104
3
votes
1 answer

How to use Extend Custom Control and use in Window

I want to make a window similar to the Android screen that shows the state of bluetooth, wifi..etc. I have a class that checks the state of said device and returns a byte value of 0 for off, 1 for on and 0xFF for error. I then made a Button…
Robert Snyder
  • 2,399
  • 4
  • 33
  • 65
3
votes
3 answers

How to Find Children of a UserControl instead of a Window - replacing Window.FindName

I currently have a WPF project which has one main Window, and many UserControls which are children of this Window. Many of the children of this window are Tabs. I have successfully replaced my main Window with a User Control that implements almost…
CrimsonX
  • 9,048
  • 9
  • 41
  • 52
3
votes
1 answer

Publishing of User control in asp.net website

I am publishing my website as precompiled deployment folder. In my website, we have usercontrols.(ascx and ascx.cs) While publishing using "rightclick on website and publish", we want to add ascx controls as it is in deployment folder without any…
Bala
  • 27
  • 5
3
votes
1 answer

how to make a picture background transparent using C#?

I have 3 pictureBoxs each one have transparent image, like this: To make the picture 2 and picture 3 transparent for picture 1 , I wrote this code: pictureBox2.Parent = pictureBox1; pictureBox3.Parent = pictureBox1; Now, my problem: How…
Free User
  • 211
  • 2
  • 14
3
votes
2 answers

User Control Custom Property lose value when build

I have a UserControl named "UserControl1" with a label inside it and a custom property: [Browsable(true)] public new string Text { get { return label1.Text; } set { label1.Text = value; } } public UserControl1() { …
3
votes
2 answers

Showing public fields of a UserControl in designer

I am trying to add some fields to a custom UserControl that I am making. I have some fields that I like them to be visible in the Properties window of Visual Studio. I tried to use the flags below but I dont see the field in the designer, even after…
Dumbo
  • 13,555
  • 54
  • 184
  • 288
3
votes
3 answers

Return value from usercontrol after user action

Essentially I need the same thing that Form.ShowDialog() offers, but with a UserControl. Inside a winform, I load a UserControl, which should allow a user to select an item from a list, and return it back to the caller. For example: var item =…
SharpAffair
  • 5,558
  • 13
  • 78
  • 158
3
votes
3 answers

UserControl Load event raised once in Winform

I have a Winform with a panel that loads different user controls depending on user inputs. // to load a user control pnlContent.Controls.Add(uc1); // to change to different user…
Eddie
  • 197
  • 1
  • 2
  • 11