Questions tagged [childcontrol]

25 questions
26
votes
2 answers

expose and raise event of a child control in a usercontrol in c#

Hi. I have a UserControl which contains a textbox. I wanted to access the textchanged event of the textbox but in the event properties of the usercontrol I don't see the events for the textbox. How can I expose and handle particular events of the…
Anirudh Goel
  • 4,571
  • 19
  • 79
  • 109
10
votes
2 answers

WPF Mouseover Trigger Effect for Child Controls

Lets say I have this bit of code:
Ristogod
  • 905
  • 4
  • 14
  • 29
5
votes
2 answers

How to get the control under the mouse cursor in onMouseDown event?

I have a TGridLayout filled with some images in a Firemonkey HD Application. In the gridLayout's onMouseDown event I want to get the image object on which the user has clicked, but I have only mouse coordinates. Implementing onMouseDown event for…
iPath ツ
  • 2,468
  • 20
  • 31
3
votes
1 answer

C#: How to suppress UserControl to give focus the first child-control?

I have a UserControl which can have childcontrol. The usercontrol have the styles: this.SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.Selectable | …
Wowa
  • 1,791
  • 1
  • 14
  • 24
2
votes
2 answers

Change child control (contentcontrol) property on mouseover of parent

I am new to WPF and am not able to figure out how to change the property of the child ContentControl of the Button control on mouse over. My code looks something like this:
2
votes
4 answers

How make WPF Listbox child datatemplate controls select the ListBoxItem container when clicked?

I have a listbox and in the datatemplate I have an Expander. If I click on the Expander Header, the expander expand the content zone but not make the parent ListBoxItem Selected. If I click on the Expanded Content Zone of the Expander, the parent…
Alex
  • 1,237
  • 3
  • 18
  • 29
2
votes
3 answers

Make sure nested child control is visible

I have a utility routine that I call when validating user input in a dialog fails. It sets focus to the offending control, beeps and displays an appropriate message to the user. This works well as long as the offending control is not hidden. Now I…
Uli Gerhardt
  • 13,748
  • 1
  • 45
  • 83
2
votes
1 answer

LinkButton child controls render

I want to have a LinkButton that adds 'span' tag around the text. protected override void Render(HtmlTextWriter writer) { Text = String.Concat("", Text, ""); base.Render(writer); } It's works perfectly, but…
Aleksandr Ivanov
  • 2,778
  • 5
  • 27
  • 35
1
vote
1 answer

ASP.NET Button on Placeholder and Placeholder in an User Control (ascx) file Button event not fired

I am dynamically creating link buttons on user control using a place holder and the eventhandler attached to the link button click+=new Event(Button_Click) is not firing Thanks in Advance Code Snippet of protected override void…
Madev
  • 46
  • 4
1
vote
1 answer

Route WPF keyboard events to child DataGrid from MainWindow's PreviewKeyDown

I have a window with several single-line Textboxes and one DataGrid (.Net 4.5 on Windows8). I'd like to route navigation events (Up/Down/PgUp/PgDn, etc) to the grid, regardless of which control has the focus. I tried overriding PreviewKeyDown in the…
AVIDeveloper
  • 2,954
  • 1
  • 25
  • 32
0
votes
2 answers

Problems passing on size change to child controls

I am developing a WinForms app with a layered interface like this: Ignore Panel A. Next to that I have a TabControl with 2 tabs. On the TabPage of the 2nd tab, I have a few controls at the top for filtering data, and below that I have Panel B, a…
Todd Hoatson
  • 123
  • 2
  • 18
0
votes
1 answer

WPF Child Control Inheritance

I am trying to implement a control to inherit from in WPF. I have never been working with WPF (at least at that level though). So I need some direction of best practice on how to solve this. The problem I´m facing is that my control, that I want to…
RadiatorTwo
  • 152
  • 2
  • 8
0
votes
0 answers

VB.NET Module-level variable to store count of child forms

In this exercise, you’ll create an application with a multiple-document interface that consists of a parent form and two child forms. Open the project and add a parent form 1. Open the CalculateFlooringCosts project in the CalculateFlooringCostsMDI…
KarMa14
  • 1
  • 1
0
votes
1 answer

How to get an enumerator or collection of all the controls in the MainWindow in WPF?

I have a MainWindow that has Grids, GroupBoxes and TabControls and each of them has other controls inside as a Chidren, Content or Items. I would like to know if is there a way I can get an enumerator or a collection of everyone of each control in…
0
votes
2 answers

Long list selector windows phone child control event in DataTemplate

I am searching for this long time and i couldn't get it. I have a Long list selector in my windows phone 8 project. How can i manage the button event in each item in the data template? I need to get the selected item in that button event. Code…
Ramin
  • 71
  • 1
  • 4
1
2