Cannot Place User Control on Form

My application need to be 64-bit. In order to use custom user controls in the designer I just added a new project to my solution. This new project use the “AnyCPU” setting and contains all my user controls. My solution contains the following projects: MyApp which is my main project (Windows Form Application) compiled in … Read more

WPF share column width between separate grids

It is possible by using SharedSizeGroup. Also check out IsSharedSizeScope. <GroupBox Grid.IsSharedSizeScope=”True”> <Grid> … <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width=”Auto” SharedSizeGroup=”A” /> <GroupBox> <Grid> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition SharedSizeGroup=”A” /> See here for more information.

add user control to a form

After creating your user control, you should build the project (F6 or Ctrl+Shift+B). Then Visual Studio automatically adds the control to the Toolbox. You should drag the control from the Toolbox (Ctrl+Alt+X) to the form. If after successfully building the project, the control is not on the Toolbox, make sure that you have Automatically Populate … Read more

Document.Ready() is not working after PostBack

This will be a problem with partial postback. The DOM isn’t reloaded and so the document ready function won’t be hit again. You need to assign a partial postback handler in JavaScript like so… function doSomething() { //whatever you want to do on partial postback } Sys.WebForms.PageRequestManager.getInstance().add_endRequest(doSomething); The above call to add_endRequest should be placed … Read more

Abstract UserControl inheritance in Visual Studio designer

What we want First, let’s define the final class and the base abstract class. public class MyControl : AbstractControl … public abstract class AbstractControl : UserControl // Also works for Form … Now all we need is a Description provider. public class AbstractControlDescriptionProvider<TAbstract, TBase> : TypeDescriptionProvider { public AbstractControlDescriptionProvider() : base(TypeDescriptor.GetProvider(typeof(TAbstract))) { } public override … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)