usercontrols

Referencing a non-existent user Control?

I have created an application that searches a directory and loads all of the usercontrols into the form and then uses a "GetResult()" method to grab the answers from the form. I did not do this OOP style because I am still learning how to fully utilize OOP and I am now going back to design it with OOP so I can move onto the next part whi...

How to change the property of a control from a flowlayoutpanel?

How to change the property of a control in a flowlayoutpanel assuming that you add the controls programatically and assuming that the name of each controls are the same? For example this image shows you that there are 2 text boxes and two buttons, how would I change the back color of button 2? Assuming the controls has been added at run...

Changing the window control buttons in WPF

I see that many applications do not have a title bar, but still have the window controls in the upper right corner. These are also styled differently than the normal windows form controls. Is it possible to achieve this effect in WPF? Here are some examples: Zune Desktop software: http://i548.photobucket.com/albums/ii356/elpedrogra...

What kind of UI controls are available to capture distance from a certain location

We need to capture user input for searching within a certain distance:- a) find hotels within a 10 km radius b) find pizza restaurants within a 5 km radius Looking for suggestions on a suitable UI widget / control to capture distance information ...

Set DataBindings property for UserControl from VS designer

I've created simple UserContorl(WinForms) that consists of 1 TextBox(Txt) control, also i created property "Txt" that return this control(Txt). Now when i try to set DataBindings for this contorl from the VS designer through Txt property, it failed. i.e. you can set the property, but if you close vs designer and open it again DataBinding...

User Control on Panel remains visible when visible set to false.

I am trying to swap out user controls dynamically. How can I 'hide' controls on a panel? Removing them from the Controls collection does not work and setting the control's visible property does not work. ServersView servers = new ServersView(); ServersPresenter presenter = new ServersPresenter(servers); _view.Se...

How to access ItemsSource property of a DataGrid defined in UserControl from main xaml file ?

I have declared a DataGrid in UserControl. Now I have included the UserControl in my main xaml file. I am trying to set the ItemsSource property of DataGrid from main.xaml; but I am getting an error "The property ItemsSource doesnot exist in the namespace". I am able to set the other properties like Background,Foreground, etc. My Us...

WPF textbox usercontrol containing items, not simple text (for adding email recipients)

Hi, does anybody know of any usercontrol that would function well as a textbox for entering email recipients. The control would appear as a simple textbox. When a user would enter some text a drop down list of matches would be displayed. When he would select an item from the list, this item would be added to the textbox. If the user wo...

UserControl Inheritence Base controls not being created!!

Can anyone tell me how to fix issue im having with usercontrol inheritence. create Base usercontrol which contains a label and sets text of it to be "test1" this is set in the designer. Create a user control which inherits from the base user control. now try to display the inherited user control on a web page but noting shows. i.e. t...

Sharing value from child to parent control.

I am relatively new to this, but here is my problem. In asp.net, I have a parent and a child control. Within the child control I have a dropdown list. Based on dropdown list's selected value I would like to toggle Visibility of Panel in parent control. For instance if I select Show in child control dropdown list, I need to pass true to ...

GUID Attribute in UserControl

Hi, please explain the following: I could see GUID Attribute is hard coded in many sites as: <Guid("69F023FE-9545-415e-A47D-CA7D2C158AA0")>. Is the value hard coded or generated? If it is generated then how to get the value?? Also, explain me how to get the user control in VB 6.0 after adding the reference of user control in VB 6.0. ...

ASP.net Usercontrol Base and child how to initialize Base controls ????

HI , 1.create Base usercontrol which contains a label and sets text of it to be "test1" this is set in the ascx page. 2.Create a user control which inherits from the base user control. 3. Now on the page load of the child control i try to do: protected override void Page_Load(object sender, EventArgs e) { //Exception thro...

How to unit test GUI elements?

I would like to create a custom user control, which extends the textbox in WPF, but only accepts numeric values. When the user types in a non numerical value, the textbox should not respond to the input. How can I simulate userinput to a textbox, to be able to create a unit test for this behaviour? I am using the built in test framewor...

UserControl inside class vs class inside UserControl for Windows Forms

I'm working on a modular project consisting of multiple sensors, each inheriting from an abstract Sensor class. To configure each sensor, I have started to add a user control panel for each sensor (inherits from UserControl), which is loaded at runtime and displayed in a panel by the calling application. But then I realised that to chan...

Resize WinForms UserControl

Hi, folks, I've developed user control on WinForms, that consists of 2 textBoxes and 1 button between.When i add this control to the form and try to resize it(in general i need to resize only width), textboxes and button are not resized and staied on their place, but resized only form(User control) on which this controls are placed. How...

ASP.Net MVC UserControl in View with different controller?

Hi All, I am trying to create a usercontrol that is an extremely simple form. This usercontrol will appear in a number of different views in my app. I am thoroughly confused on how this can be accomplished. I have created a controller, and then created a usercontrol that uses that controller. I then created another controller and crea...

load user control in tab

I have a user control that fills a combo from DB overriding the OnLoad. A form containing the control has tabs and the control goes into the 3rd tab. Within the form_Load i set the value for the combo. My problem is that the user control onload is not fired until the form_load is completed, therefore my combo.items is not populated and ...

How to access DataTemplate in ResouceDictionary of UserControl

I have a resource dictionary as follows defined in my UserControl: <UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="../ParameterEditorResourceDictionary.xaml"></ResourceDictionary> <ResourceDictionary> <DataTemplate x:Key...

Direct3D GUI engine development

Hi guys, I have developed direct3D video rendering library that is used for rendering video in audio/video network application. It also has simple GUI. I'm using texture with controls (draft) and ID3DXSprite interface. What I wanna do is to extend the GUI part to make it more flexible and convenient. 'Cause when I need to add some fun...

usercontrol with colorbox not firing an event

I have a colorbox which shows a hidden div when a link is clicked. within the div being shown in the colorbox is a usercontrol. its basically a subscribe to newsletter form that adds them to our customer db. For some reason the button to submit the form will not work in the colorbox, but it will if i move it outside of the hidden div. Th...