Questions tagged [custom-controls]

A custom control is a reusable GUI element, derived from an existing control type, customized with additional behavior, functionality and/or appearance.

Depending on the platform, language, framework and purpose, custom controls are likely to be installed in a GUI designer for ease of use.

Some languages or frameworks (e.g. ) might have specific meanings to the term "custom control" or might provide specific features or capabilities for a custom control instance that are not applicable to base controls.

Custom controls can be self written or found in a lot of frameworks.

4201 questions
30
votes
4 answers

How can a control handle a Mouse click outside of that control?

I'm writing a custom control and I'd like the control to switch from an editing state to it's normal state when a user clicks off of the control. I'm handling the LostFocus event and that helps when a user tabs away or if they click on to another…
chrislarson
  • 958
  • 2
  • 10
  • 20
30
votes
4 answers

How to get instance of Panel that holds content of ItemsControl?

Every ItemsControl has its content stored in Panel right ? We can specify the panel to be used in XAML like this:
Rasto
  • 17,204
  • 47
  • 154
  • 245
28
votes
1 answer

Get the resource id for the drawable reference used in styled attribute

Having this custom view MyView I define some custom attributes:
ilomambo
  • 8,290
  • 12
  • 57
  • 106
27
votes
6 answers

WPF: A TextBox that has an event that fires when the Enter Key is pressed

Instead of attaching a PreviewKeyUp event with each TextBox in my app and checking if the pressed key was an Enter key and then do an action, I decided to implement extended version of a TextBox that includes a DefaultAction event that fires when an…
Andreas Grech
  • 105,982
  • 98
  • 297
  • 360
26
votes
3 answers

Trying to change the Border Color of a label

I'm working in VB, VS2008, winforms. I've got some labels to create, and I'm using the BorderStyle = FixedSingle. Is there any way to change the color of this border? It is always defaulting to black.
Stewbob
  • 16,759
  • 9
  • 63
  • 107
26
votes
4 answers

How can I manually tell an owner-drawn WPF Control to refresh/redraw without executing measure or arrange passes?

We are doing custom drawing in a control subclass's OnRender. This drawing code is based on an external trigger and data. As such, whenever the trigger fires, we need to re-render the control based on that data. What we're trying to do is find out…
Mark A. Donohoe
  • 28,442
  • 25
  • 137
  • 286
26
votes
8 answers

How can we do pagination in datagridview in winform

I want to show 10 records per page in a datagridview on a window form and user must click next button to show next 10 records. Is it there some property in DataGridview or do i need to create a custom control. What i need to do to achieve this.
Shantanu Gupta
  • 20,688
  • 54
  • 182
  • 286
26
votes
3 answers

Styling browser-native video controls

Is it possible to cross-browser style the controls of a browser-native video such as video from HTML5's video tag? I do not understand if it is possible or not, I can't find anything other than this article but it seem uses Javascript. I would like…
itsme
  • 48,972
  • 96
  • 224
  • 345
25
votes
3 answers

Design-time package fails to build - File not found: 'Graphics.dcu'

In Delphi XE2, I have a single control in a pair of design/run time packages. Originally, everything was working fine. I've built each of them many times already. Suddenly without warning, the design time package started complaining in one of my…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
25
votes
1 answer

Customizing WinForms ErrorProvider to display its icon inside control's entry

I have some custom/user controls that in most cases have label and entry, like this: removed dead ImageShack link Is there any way I can customize the standard WinForms ErrorProvider to display its icon inside entry (entry - textbox, combo, datetime…
Jarek
  • 5,885
  • 6
  • 41
  • 55
24
votes
1 answer

Metadata override and base metadata must be of the same type

I'm trying to override the metadata of ItemsControl.ItemsSourceProperty in a derived class in order to assign my own callback : public class CustomDataGrid : System.Windows.Controls.DataGrid { static CustomDataGrid() { …
eran otzap
  • 12,293
  • 20
  • 84
  • 139
23
votes
4 answers

How to make WPF wrappanel child items to stretch?

I'd like to create an ItemsControl where child items are placed like a WrapPanel, but child Items should take as much space as it can. So that when the window size gets larger or smaller, the child items should stretch according to a certain…
Yeonho
  • 3,629
  • 4
  • 39
  • 61
23
votes
1 answer

Radial menu android with button click?

I want to design menu like this. I have tried animation but it does not retains position of buttons. if any one have done this type of menu please guide me. Any help will be appreciated.
MAC
  • 15,799
  • 8
  • 54
  • 95
22
votes
5 answers

Google map v2 Custom Infowindow with two clickable buttons or ImageView

I need custom info window with two clickable button as above.In it when more then marker and click any one of them then window should be open and when click on another marker another window should open and close previous window as well in single…
22
votes
4 answers

Text diff visualization control for WinForms or WPF

In continuation of the my previous question, are the any good controls for text diffs visualization? Something like StackOverflow's revision diff viewer but for WinForms or WPF Requirements: free, preferably open-source based on WPF or WinForms No…
aku
  • 122,288
  • 32
  • 173
  • 203