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
0 answers

Prevent adding controls from toolbox to a UserControl at Design Time

I'm trying to create a user control that inherits of Panel. It has to be like a header, i'll draw border and text etc. But the sole purpose of creating it is, that i want that during design time, if I drag a control on it I get the "No" /…
3
votes
1 answer

asp.net user control event propagation trouble

I have a simple user control that contains some buttons that fire events which I want to be handled by the page using the control. I have my code setup as such: public event EventHandler Cancel; public event EventHandler Confirm; public void…
Jimmy
  • 9,686
  • 14
  • 59
  • 78
3
votes
4 answers

Inheriting from a User Control to use a different child Control

I have a user control, GridMasterControl which contains (amongst other things) another control called Grid. Now I need to inherit from Grid to create EditableGrid (to add editing functionality to the grid). I then need to create an…
Mongus Pong
  • 11,337
  • 9
  • 44
  • 72
3
votes
1 answer

Get Children with a Click Event on the Parent

Is there a way that I can click on a WrapPanel's children and get the children, but without having to insert a Click event in every children? Can I just insert a Click event on the WrapPanel? my code below:
Albert
  • 127
  • 2
  • 13
3
votes
2 answers

Usercontrol as datatemplate with bindings

I have an ItemsControl with ItemsSource binded to a list of SystemModels. It has to generate an usercontrol for every system in the list. And in those usercontrols it has some textboxes that show the name, is and location of the system. My code…
user2499088
  • 625
  • 1
  • 6
  • 12
3
votes
9 answers

Why doesn't my jQuery UI datepicker work for postbacks when it works fine on initial page loads?

I've been trying to integrate the jQuery UI Datepicker into our ASP.NET WebForms application. The application uses master pages to provide a common look to all pages, and all of the content pages are built inside the ContentTemplate of an…
JeffK
  • 3,019
  • 2
  • 26
  • 29
3
votes
2 answers

Adding a ServiceReference programmatically during async postback

Is it possible to add a new ServiceReference instance to the ScriptManager on the Page during an asynchronous postback so that subsequently I can use the referenced web service through client side script? I'm trying to do this inside a UserControl…
Oliver
  • 9,239
  • 9
  • 69
  • 100
3
votes
3 answers

WPF - Should a user control be supplied with a ViewModel

I'm about to use a user control developed by a different team (in the same company) and for the app we're developing we're attempting to describe all the data binding in XAML. Now if I use a third party user control should I expect them to supply a…
AwkwardCoder
  • 24,893
  • 27
  • 82
  • 152
3
votes
1 answer

Cannot delete file when used in DataContext

My application shows images on screen (images based upon files on the local computer) and users can delete them if needed. Every time I try to delete a file it results in the following error message: "The process cannot access the file…
Dave
  • 8,163
  • 11
  • 67
  • 103
3
votes
2 answers

C# UserControl multiple inheritance

I would like to create my own user controls which implement more properties and methods than the ones given from .NET Framework. First of all I would like to have a custom UserControl class, which I would call MyUserControl and of course will…
Stefanos Kargas
  • 10,547
  • 22
  • 76
  • 101
3
votes
1 answer

WPF user control not being disposed

Each time I open a view the number of get requests to each of the model properties increment by one. Just to be clear if I open the view once, close it and open it again there are two get requests to each property, and if the property is set and…
Sam
  • 586
  • 1
  • 6
  • 25
3
votes
3 answers

C# exclude complete form / usercontrol by using compiler constants

I'd like to exclude / include a complete form in my project. But when I add the needed #if CONST and #endif the compiler complains about resources that may get wrong names. warning MSB3042: A namespace or class definition was found within a…
Simon Ottenhaus
  • 715
  • 2
  • 8
  • 19
3
votes
3 answers

Asp.Net: Passing value from Page to UserControl

I have a textbox on my aspx page and I need a usercontrol to be able to see or access that value, how would I do that please. I created a public property on my aspx page public string txtBoolValue { get { return this.txtBool.Text;} …
Melt
  • 481
  • 2
  • 10
  • 17
3
votes
0 answers

DataBinding in Usercontrol

I have a ListView with UserControl:
3
votes
1 answer

Dynamically changing UserControl content at run time with WPF/MVVM

The screen I am trying to create is a multi-part results viewer. When your batch job completes, you will be able to double click on it and open this screen, which will contain a top section of basic data about the batch job that just ran (top 30% of…
NZJames
  • 4,963
  • 15
  • 50
  • 100