usercontrols

How can I have design time support for my custom user controls in Visual Studio 2008?

I'm an creating a custom user control for .NET Compact Framework and I want to keep design time support. I'd like to think in Visual Studio 2008 that this is not the crazy almost impossible task it once used to be. And I'm hoping there is a simple tutorial somewhere that will show me, it is a snap. Any chance? ...

Stop asp.net image control automatically UrlEncoding the ImageUrl parameter

By default the asp.net image control trys to be helpful and automatically encodes anything set to the ImageUrl property, so: imgSomething.ImageUrl = "Generator.aspx?x=1&y=2&z=3"; Becomes "Generator.aspx?x=1&y=2&z=3" The problem is I want to pass Base64 encoded parameters, which I need to manually Server.UrlEncode because ea...

Web User Control not visible in Default.aspx

What gives? My previously created user control is visible, but the newly created one is not - intellisence doesn't show it, I was under the impression that you don't need to put any using statements or references in the project if the web user control is in the same project. UPDATED: both declarations look something like this: public ...

Vista-alike WinForms control with a tight color bar on the left and icon and text more to the right

Is there any opensource implementation of a winforms control like the one on Windows Update window where "No important updates available" or another status is displayed? It looks like a bordered bar wih a tight vertical color bar - green or red depending on the information displayed, a large icon and several lines of text more to the rig...

C# stop property change at runtime

I have been trying to build a user control with some custom properties set in the designer. However the control involves some interop code and settings which shouldn't be adjusted at runtime. Is there a way to stop the values being changed after they have been initially set by the designer code? ...

Convert User Controls to Server Controls.

I'm wondering if anyone has any experience converting User controls to Web controls? Ideally, I'd like to offload some of the design work to others, who would give me nicely laid out User Controls. Then, I could go through the process of converting, compiling, testing and deploying. Until MS comes up with the magic "Convert to Serve...

[C#] What is the best way to handle mutliple view/tab-ish GUI elements

I'm working on an application that presents the user with varied data, depending on the object being viewed. The objects are all of the same interface just with extended properties beyond once distinguished. I'm looking for the "best" way to display a type-dependent control to the user. I would like to use tabs but I'm stuck with .NET 2...

ASP.NET User Control Property Value Options In Designer Mode

I am using Visual Studio 2008 | .NET 3.5 | C#. I have created an user control that has the following property: DisplayMode. DisplayMode is meant to either display a series of text boxes or a single text box. [Browsable(true), Category("Appearance"), DefaultValue(DISPLAY_MODE_FIELDS), Description("Indicates whether to display the phone...

Application design, separated logic, delegate or not

Delegates, would those apply here? If so, how? Code examples, as I am new to this area. Logic separation is what I am intending to implement and I think my task below would be a perfect candidate. I have read that objects should be fairly independent and not hard wired to one another. ASPX (Page) <uc1:Attachment ID="Attachment1" runat...

.NET Winform - thumbnail of usercontrol

I have an app which uses some usercontrols. I want to take a thumbnail image of the usercontrols when they are loaded for use and add them to a flowlayout panel. Where can I find information on making a thumbnail image of a usercontrol when it's loaded? ...

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

Hi i have a UserControl which contains the textbox within, 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 child controls from the publically exposed UserControl in Winforms with C#. ...

Handling User Control Events on Containing Page

I want to have a user control containing a save button. I want the click event attached to the save button to be handled by the containing page not the user control Is this possible? EDIT MORE SPECIFIC Say I have a page called "Editor Page" and a user control called "Editor Buttons". On the "Editor Buttons" user control I have a sav...

Explicitly Prevent ContextMenuStrip from Loading in C#

Hi, I have a requirement to hide the contextmenustrip when a particular flag is not set. As i don't think we can explicitly control the show/hide of the context menu strip, i decided to trap the right mouse button click on the control with which the contextmenustrip is associated. It is a UserControl, so i tried handling it's MouseClick ...

Is there any performance reason to not use UserControls?

Is there performance difference when using say 10 user controls on a page vs a page displaying the same data, but without user controls. ...

UserControl doesn't show up in blend.

Hi! I use WPF UserControls to design some part of my application. I'm using blend 2.5 for the graphical part. But when I have a user control into any content, it won't show up in blend and a, exception will be raised, saying that the resource couldn't be located. My application is localized, I moved my localized DLL into Blend folder. ...

Winform - which is a usercontrol last event to fire

Which is a usercontrol last event to fire when the application/control is loaded? The load event? ...

Making the ToolBar Button Style apply to UserControls in the Toolbar

How do I force UserControls in WPF that are inside a ToolBar to use the ToolBar's default button style? I have a simple user control called ImageButton which has XAML something like this: <UserControl x:Class="myNameSpace.ImageButtonUserControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://s...

WinForm User Controls - Drag Drop

Is it just me... but I thought you could drag/drop User Controls onto WinForms? Can't drag them to the toolbar either. Maybe I'm having a VB6 flashback. It must be missing something simple I'm doing wrong. ...

how to get usercontrol to update

This is in MSVC# 2008. I wrote a simple usercontrol that has 2 labels, 2 textboxes and 1 button. I also created a few properties for the user to set the labels' and the button's text. I added this usercontrol to a form, compiled and ran it and it worked fine. Then today I went back and added another similar property. Now suddenly...

Encapsulating and customizing a third party WPF control

I'm interested in customizing a 3rd party control, such as Telerik's RadGridView, as a standalone control, for example adding New Row and Delete Row buttons above the grid, yet still supporting XAML manipulation of the internals of the control by the window upon which my control exists (i.e. for the window to add its own style to a colum...