usercontrols

Non-abstract event defined in abstract class won't show in Designer for derived classes

I'm using the class listed below to create a UserControl wrapping a ComboBox that can accept a List<T> and return an object of type T when the internal ComboBox's selection is changed. Everything works fine in code, exactly as I expect it to, but I can't get SelectedItemChanged event to show up in the Designer anymore when using my con...

move from form to user control

I have a bunch of Forms that I embed in tabpages(some are embedded two and three layers deep) that I now suspect are giving me trouble. I have been told that User Control's are the better approach. Now I am wondering how I canaccomplish this as quick as possible. Is it as simple as copy and paste? Has anyone ever done something like...

Overriding the location of Controls even when they are directly accessed by myControl.Controls(index)?

Hi, I want to make a UserControl which holds and moves other controls within itself. I worry that the Controls collection can be used to destroy all the internal logic of the UserControl. Remembering that the .Net Framework TableLayoutPanel locates its own Controls, I created a 30x30 TableLayoutPanelm each cell containing a square Label...

AnyCPU ASP.NET control embedded in a 64bit .NET DLL

I have a large .NET library that is currently being built 64bit. Inside that library I have a ASP.NET Custom Control. Since Visual Studio is 32Bit I can't add this DLL to the toolbox properly. I do not want to recompile the entire DLL 32bit since it links against other 64bit libraries, but I was wondering if I could create another DLL...

How to color Text in Popup menu of NSComboBox?

Hi, I'm using a NSComboBox and want to mark some of the items in the popup list appear in red. I couldn't find a proper Method to override in NSComboBoxCell. Any idea? ...

webpart control in master page

Hello all, I have a webpart in a control that I am using on a webpage. The webpage uses a master page and there is a content holder in the MP that can hold controls for alignment/design issues. Everything works well with this but the webpart control. When i put the webpart in the container i lose the ability to move the webparts around ...

How do I expose the visible property of an image inside a user control (c#)?

Problem: A control that shows each user which quizzes they have passed out of a possible four. My solution: Create user control that lists the name of the quizzes and has a checkmark at the end of each quiz name that I would like to make visible when they pass a quiz. The actual user control is inside of my master page. From reading...

Collection property for WPF usrecontrol

Hi I want to create a usercontrol in WPF through which i want to expose a collection property. I want to change the UI of the usercontrol based on the changes in collection. For example lets say i have a collection of strings which is binded to my usercontrol. Based on that collection i want to create buttons on the usercontrol contain...

What are the benefits of using namespaces in webform pages?

I understand the pros of using namespaces within the actual application layers but when it comes to the front tier, I am not so sure. My project is a Website (not WebApplication) and I get all sorts of problems (missing references, for one) when I try and include "namespaced" user controls. Despite explicit declarations in web.config u...

How do I call a method that is in the webpart class file, from a usercontrol in SharePoint 2007?

I've followed the instructions in this MSDN article: http://msdn.microsoft.com/en-us/library/dd206945.aspx Is it possible to call a method that is in the myWebPart.cs file, from the MyUserControl.ascx file? I don't seem to have intellisense of the methods in the myWebPart.cs unless I do: myWebpart mywbprt = new myWebpart(); mywbprt.my...

How to Raise Events from VB.Net ClassLibrary/UserControl (ActiveX) to JavaScript?

I've created a VB.Net ClassLibrary with a UserControl in it. I can load it from an HTML page and call the methods that I created. This works as expected. I've tried several examples for how to raise an event from the VB code to the js caller, and none of them seem to work (I'm using IE7). What I'm doing: Public Class ctrlABC Public ...

How do I expose the columns collection of GridView control that is inside a user control

See edit. I want to be able to do this in the aspx that consumes the user control. <uc:MyControl ID="MyGrid" runat="server"> <asp:BoundField DataField="FirstColumn" HeaderText="FirstColumn" /> <asp:BoundField DataField="SecondColumn" HeaderText="SecondColumn" /> </uc> I have this code (which doesn't work). Any ideas what I...

Cannot display custom controls in VS 2008 Designer -- .NETCF

I'm having problems displaying custom (inherited) controls in my .NETCF windows mobile project in Visual Studio. The control appears on the designer surface as a gray box with the class name written in it. As a test case I have a simple control defined as: public class ucButton2 : Button { } Should be just like a button but it gives...

Problem with Google maps with in user control

Hi, I am having a problem with google traffic maps in a usercontrol.I have a usercontrol which has google traffic map with a Zip Code textbox, Search and Clear link buttons. The problem with this usercontrol it displays map with the traffic for on page load(with default zip) but when I try to search for a zip and click search link butto...

Problem with Gmaps in usercontrol

Hi, I am having a problem with google traffic maps in a usercontrol.I have a usercontrol which has google traffic map with a Zip Code textbox, Search and Clear link buttons. The problem with this usercontrol it displays map with the traffic for on page load(with default zip) but when I try to search for a zip and click search link butto...

UserControl as a TabItem

Hi, I've been playing with WPF and I'm not sure what I'm trying to do is possible. So is it possible to have a usercontrol describing a tabitem? I've tried but without success. Right now I use user controls for the content but I would like to change that to be more generic. ...

catch a user control event

hello, ive created a user control keyboard.. when you click on abutton in the keyboard the button_click event is thrown and a string is get a parameter example when clickin on button C CButton_Click { txt="C"; } i need to catch that event outside the user control... so that when clickn on the button a textbox is filled with the string....

2D Array of TextBoxes in UserControl

Im trying to write a usercontrol that has a 10 x 10 grid of textboxes, keyboard navigation between them and keyboard increment/decrement and then custom highlighting dependent on variables coming in on my coms module. My idea was to store the textboxes in a 2D array for easier referencing. Am I going obout this the right way? Any other ...

c# Winforms: Refreshing a portion of a GUI (containing 1 or more controls)

I have a Control that can overlay multiple C# user controls in my GUI. This control has a semi-transparent background in order to 'grey-out' portions of the GUI and the class looks somethink like this: public greyOutControl: UserControl { // Usual stuff here protected overide OnPaint() { paintBackround(); b...

Control vs UserControl in WinForms?

What is the difference between a Control and a UserControl in .NET WinForms? I want to create a custom control, but which one should I inherit from? I've always used Control in the past without any issues, but is the "recommended" way of creating a custom control? ...