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
26
votes
3 answers

How to relative scale size of User Control?

How to relative scale size of User Control like image (in image editor). Example (100%): (source: stegnar.com) Scaled down UC (70%): (source: stegnar.com) Well I achieve this in picture editor, but I would like in WPF. :) I need this to adjust…
Peter Stegnar
  • 12,615
  • 12
  • 62
  • 80
25
votes
8 answers

Element is not a known element warning in Visual Studio when using User controls

I have a Visual Studio 2008 project that is showing the following warning when using User Controls, and I haven’t been able to find a solution anywhere. Element is not a known element How can I fix this?
chris
  • 36,094
  • 53
  • 157
  • 237
25
votes
13 answers

Can't access control ID in code behind

I have the following code in my aspx page: and this in my code behind: protected void Page_Load(object sender, EventArgs e) { myButton.Text = "bye"; } For some reason the intellisense…
David
24
votes
6 answers

The tag "xxx" does not exist in XML namespace"yyy" / Reference could not be found

I have a winform usercontrol than I want to add to wpf project. I added the relevant references (WindowsFormsIntegration, SystemWindowsForms and my user control dll) and added this row in my…
Maya
  • 989
  • 4
  • 12
  • 19
24
votes
1 answer

WPF user control bind data to user control property

I have user control: xaml
user1736332
  • 693
  • 4
  • 11
  • 22
24
votes
5 answers

C#: How to get a user control to properly auto size itself

I have a UserControl which consists of a Label (Top), a FlowLayoutPanel (Fill, TopDown flow and no wrap) and a Panel (Bottom). The user control creates a number of controls, based on a list of stuff it gets, and adds them to the FlowLayoutPanel. How…
Svish
  • 152,914
  • 173
  • 462
  • 620
23
votes
5 answers

How do I make a group box's text bold but not the text of controls contained in it?

I went and created a tab containing a good amount of controls, most of which are contained within what I'll just call the top-level group box. Now I decide I'd like the text of the top-level group box to be bold, but nothing else. When I set the…
RobC
  • 1,303
  • 3
  • 15
  • 32
23
votes
4 answers

All controls are null within usercontrol

I have a UserControl which uses a UserControl, among other controls. In the ascx file I have the following code: <%@ Register TagPrefix="tag" Namespace="some.name.space" Assembly="some.assembly" %> In my…
VFein
  • 1,021
  • 2
  • 11
  • 23
23
votes
11 answers

Assign Null value to the Integer Column in the DataTable

I have a datatable with One ColumnName "CustomerID" with Integer DataType. Dynamically I want to add rows to the DataTable. For that, I had created one DataRow object like: DataTable dt = new DataTable(); DataRow DR = dt.NewRow(); …
thevan
  • 10,052
  • 53
  • 137
  • 202
23
votes
1 answer

How to make Twitter app style Quick Actions on Android

Is there any code that gives an example about how to implement the Quick Actions and Popdown menu that is displayed in the Twitter for Android app?
Rich Schuler
  • 41,814
  • 6
  • 72
  • 59
23
votes
2 answers

Winforms user controls custom events

Is there a way to give a User Control custom events, and invoke the event on a event within the user control. (I'm not sure if invoke is the correct term) public partial class Sample: UserControl { public Sample() { …
Kevin
  • 3,574
  • 10
  • 38
  • 43
23
votes
1 answer

send custom parameters to user control ascx

I need to use user controls (.ascx) on a page, it's a related post user control based in 2 parameters: 1. Current post 2. Relation type the page needs to have 3 different instances of this control, each having the same Current post parameter, but…
Arturo Suarez
  • 655
  • 3
  • 10
  • 16
23
votes
5 answers

Proper cleanup of WPF user controls

I am relatively new to WPF, and some things with it are quite foreign to me. For one, unlike Windows Forms, the WPF control hierarchy does not support IDisposable. In Windows Forms, if a user control used any managed resources, it was very easy to…
jrista
  • 32,447
  • 15
  • 90
  • 130
23
votes
1 answer

How to add a Templating to a UserControl?

This question has been asked before Web Forms :: Design Time Support For Custom Templated User Control In VS 2008 VS 2008 Using the ITemplate in a UserControl and getting a design time rendoring error how to show the controls for web user control…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
22
votes
2 answers

Split one big XAML in number of Sub-XAML files

In my WPF4 Desktop-based application there is a big block with sidebar menu that repeats in each window and takes about 70 lines of XAML. In order to improve code reuse, I would like to split XAML file in two files: XAML-file that contains code for…
Mike
  • 14,010
  • 29
  • 101
  • 161