usercontrols

ASP.NET custom user control cannot access sitemap

I have a footer that I am adding to a masterpage. Within this footer, if constructs menus based on the Current Node of the sitemap, however the sitemap is coming back as null. Does anyone know how to fix this issue. Thank you ...

Empty Design View for User Controls In VS 2008

Hi All I got a empty design View for User Control in VS 2008. I try to follow the solution in http://blogs.msdn.com/webdevtools/archive/2008/04/27/workaround-empty-design-view-for-user-controls.aspx . But it does not work. Does anyone meet it before? ...

How to register a VB.Net User Control with jQuery

Greetings and thank you in advance for the help. I created a user control in VB.NET that uses a jQuery datepicker. I am at an impasse. The code I have works for one datepicker control on the page but because I can only register the client script once, it will not work for multiple instances/datepickers on the same page. What is the b...

How can I load .ascx user control from console application or windows service?

We use ascx user controls as templates for documents (e.g. invoices). Now I need to load,render to HTML, then transform to PDF these controls from windows service. So, what's the correct way/workaround? TemplateControl.LoadControl(path) doesn't work. ...

VB NET using custom controls with jquery in a gridview in edit mode

Greetings and thank you in advance for your answers. I am fairly new to creating controls. I have created a datepicker control which uses the jQuery datepicker. It works in most instances except within another control which utilizes a gridview. It seems that control is not being loaded since the control is only created in edit mode, ...

drag to pan on an UserControl

Hello, I'm trying to build my own "PictureBox like" control adding some functionalities. For example, I want to be able to pan over a big image by simply clicking and dragging with the mouse. The problem seems to be on my OnMouseMove method. If I use the following code I get the drag speed and precision I want, but of course, when I re...

Pass WPF UserControl reference to another UserControl

I've created two UserControls, a ValidationManager and a ValidationOutput. On a given form there is one ValidationManager and several ValidationOutput controls, one for each control that is validated. The ValidationManager is given a list of validation errors when the form is submitted, I want each ValidationOutput control to look at thi...

UiElement based on another class

I placed a control into a grid. let's say the control is derived from public class 'ButBase' which is derived in its turn from System.Windows.Controls.Button. The code normally compiles and app works just fine. But there's something really annoying. When you try to switch to xaml-design tab it will say 'The document root element is not ...

WPF - How do I use the UserControl with a dependency property and view model?

Hello, My goal is to have a user select a year and a month. Translate the selection into a date and have the user control send the date back to my view model. That part works for me....However, I cannot get the ViewModel's initial date to set those drop downs. public static readonly DependencyProperty Date = DependencyPropert...

Setting custom control properties

I though it would be very simple but I can not get it today. I have a user control, with a grid control contained in it. public Unit Width { get { return CustomerGrid.Width; } set { CustomerGrid.Width = value; } } I expose the width property and when I set it in the designer it works at run-ti...

Mimic C preprocessor with Python/Ruby?

I need to mimic the preprocessor feature of C with Python. If I want to run the debug release, I use as follows with C #ifdef DEBUG printf(...) #endif I just use -DDEBUG or similar to trigger it on or off. What method can I use for Python/Ruby? I mean, what should I do to control the behavior of python/ruby scripts in such a way th...

How can I add an Items-like property to my User Control?

It's pretty straightforward to add simple properties to a User Control that will appear in the desired categories in the Windows Forms designer, e.g.: [Category("Appearance")] public Color BackColor { get { return _textBox.BackColor; } set { _textBox.BackColor = value; } } What if I want to expose a more complex property, such...

Capture a keyup event at application level in WPF

Hi I have an application built in wpf. At the base level I have a usercontrol and on that usercontrol are many components. I want to be able to capture a key press event on my usercontrol even if the focus is on one of the children. Using PreviewKeyUp doesn't seem to do the trick. Thanks, Matt. ...

Loading user control dynamically looses data

I have a created a user control. This user control I dynamically load on a page inside Telerik Panelbar control. I have done all necessary coding to save the viewstate and load this dynamically created usercontrol every time page loads. On this User control I have a asp panel. By default this panel is invisible. When user clicks a butto...

How to create html tag to access a specific control in a VB6 .ocx?

I have an Active X control that contains 2 user controls. My issue is I need to create a web reference on 2 separate pages for each user control. They are not related and I don't know how to call one user control independently from the other. Is there an attribute for the object tag to reference the user control name? ...

Dock=>Fill a control in FlowLayoutPanel

I have a UserControl in which a FlowLayoutPanel (FlowDirection is as by default - LeftToRight). This user control consist of a description and some controls: [descr.] 123456789, it should be able to be reversed 987654321 [descr.] So FlowLayoutPanel is used for this scope(RightToLeft - True/False). Is this a way that the label1 fil...

User Control as container at design time

I'm designing a simple expander control. I've derived from UserControl, drawn inner controls, built, run; all ok. Since an inner Control is a Panel, I'd like to use it as container at design time. Indeed I've used the attributes: [Designer(typeof(ExpanderControlDesigner))] [Designer("System.Windows.Forms.Design.ParentControlDesigner, ...

Simple user control for conditionally rendering nested HTML

What I would like to do, is be able to pass two attributes to a user control, a ListName and a Permission, like so: <uc:check id="uc" List="Shared Documents" Permission="OpenItems" runat="server"> <!-- have some HTML content here that is rendered if the permission is true --> </uc:check> Then in the actual check user control, have s...

Javascript Like Modal Window for WinForms.

Does anybody know a good Modal Window control sort of like the ones used in Javascript but available for WinForms (C#) with the transparent background and all. Example in Javascript http://okonet.ru/projects/modalbox/ Something like ModalCoolForm f = new ModalCoolForm(); f.ShowDialog(this); ...

winforms - event life cycle

Just like there is page life cycle in web applications, what is the event life cycle for Winforms, especially between form and usercontrols? ...