usercontrols

Recommend Books for Developing ASP.NET User and Custom Controls

Please recommend books for developing ASP.NET User and Custom Controls ...

How can I set the scroll area and origin on a UserControl with AutoScroll ?

:) My question is quite a mouthful. This is a WinForms question : I'm making a UserControl where the mouse wheel is used for zooming and the content would be drawn using GDI+. After I activate AutoScroll, how can I set the area size and origin of the scroll view ? Thank in advance for any help. ...

How to create Non Resizable custom server control

Hi guys, I am building a custom web panel control for specific purpose.I want the control be fixed with specific width and height so that not to be resized in design mode as well as from property window.How can I do this. It is very important and urgent.I will appreciate if you can help me. ...

Selecting the usercontrol to the relating datatemplate in mvvm

Hello, I have lets say a WeeklyViewUserControl.xaml and a DailyViewUserControl.xaml. Normally I used stuff like this to switch content: <DataTemplate DataType="{x:Type ViewModel:LessonPlannerViewModel}"> <View:LessonPlannerDailyUC/> </DataTemplate> This worked so far. But now I have still the WeeklyViewUC which uses 90 ...

Creating a templated silverlight control that has a story board.

I'm trying to create a templated silverlight control that has a simple animation (swap a few color properties). An example would be a control that is similar to the 'questions' menu item in stackoverflow. So the consumer of the control can specify the background color and the background color for the mouseover event. I've run into th...

How to pass value from wpf form to wpf user control

Hai am having a WPF user control in my WPF Form, when i click my button in my form , i just want to pass some value to the textbox which is in the usercontrol, tell me how to do this. ...

Custom Windows Forms Control not exporting functions, not showing in tools list, showing as Text

Hi, I have written a very simple control. C# Visual Studio 2008. Its output should be, and is a dll. I have added a reference to the dll within the project that I intend to use it with. The msdn article about how to write a control states that it should appear in the 'Add reference / projects' list, which it doesn't but I simply nav...

Dependency propery Binding Problem

Main WINDOW <Window x:Class="dep2.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:dep2" Title="Window1" Height="300" Width="381"> <Grid> <local:UserControl1></local:UserControl1> <Button He...

Silverlight UserControl with text field

Hi, I've created a simple UserControl in ExpressionBlend. The UserControl is a ractangle with a TextBlock in it. When i use this UserContol in a Silverlight project, i can not change the text in the textBlock of the control. Should give an acces to the TextBlock before using the Control? HELP"_ ...

custom *arbitrary* TemplateField definitions

I'm building a GridView on the fly, and I'd like to pre-define the TemplateFields to be included ondemand. So, what I'd like to do is have a declarative file that defines how the different templates look for a specific column. Like: <asp:TemplateField> <HeaderTemplate> this is a text column </HeaderTemplate...

ASP.NET: aggregating validators in a user control

I am developing a web application where I would like to perform a set of validations on a certain field (an account name in the specific case). I need to check that the value is not empty, matches a certain pattern and is not already used. I tried to create a UserControl that aggregates a RequiredFieldValidator, a RegexValidator and a Cu...

How to add custom-control-derived TabItem to TabControl in WPF?

I want to have my own base TabItem class and use other classes that derive from it. I define base class in MyNs namespace like this: public class MyCustomTab : TabItem { static MyCustomTab() { DefaultStyleKeyProperty.OverrideMetadata(typeof(MyCustomTab), new FrameworkPropertyMetadata(typeof(TabItem))); } } And ...

How do i get visual studio like tabs?

Hi guys. I've had this thought for a long time in my head now and i've not been able to find the solution to it ! Please help me. I've always loved the visual studio tabs and how they look. They're small and perfect. The normal TabControl, well is -bleh- and boring ! And i've seen these tabs being used in many applications .. so, my Qu...

C#.NET How to access fields in user control dynamically?

Hi, I'm making a settings screen at the moment that will have a radiobutton group which will determine what controls are displayed. The different settings are contained within a UserControl. I am dynamically creating this UserControl like so: panel = new btSettings(); this.Controls.Add(panel); panel.Location = new Point(15, 49); Jus...

WPF User Control loading twice

Hai am having a WPF user control, when i use that control in another window it loading twice, so its throwing exception for me, coz am having some function in usercontrol_loaded event, when it loading twice it throwing error, is there any other way to check if the usercontrol is loaded like that, else how to solve this issue. ...

Windows user control hosted in IE is not working.

Hi i have hosted a windows user control in IE. Every thing is working fine, if i open the application in the same machine where the Web application is hosted. if i access the same appication from a remote client IE, A blank box is coming with a small image in the corner. I have added the site as trusted site in the IE and made all ...

Silverlight UserControl with rectangle as a button

Hi, I have a problem using custom made UserControl in Silverlight Page. The UserControl is generally a rectangle containing a smaller rectangle inside. I want to use the UControl in a Silverlight MainSite. i've implemented a method on mouse button down for a smaller rectangle called in here Button1: public void Button1_MouseLeftButtonD...

Set Custom ASP.NET UserControl variables when its in a Repeater

<%@ Register Src="~/Controls/PressFileDownload.ascx" TagName="pfd" TagPrefix="uc1" %> <asp:Repeater id="Repeater1" runat="Server" OnItemDataBound="RPTLayer_OnItemDataBound"> <ItemTemplate> <asp:Label ID="LBLHeader" Runat="server" Visible="false"></asp:Label> <asp:Image ID="IMGThumb" Runat="server" Visible="false"></asp:Image> ...

Binding from View-Model to View-Model of a child User Control in Silverlight? 2 sources - 1 target..

Hi there, So i have a UserControl for one of my Views and have another 'child' UserControl inside that. The outer 'parent' UserControl has a Collection on its View-Model and a Grid control on it to display a list of Items. I want to place another UserControl inside this UserControl to display a form representing the details of one I...

prevent the designer from calling a getter (VS 2008, WinForms)

hi, I have a simple UserControl containing a ComboBox which is empty at first. The setter for that CB adds items to it and the getter returns the selected item. When adding this UC to a Form, the designer automatically calls the getter for the CB which is empty. The method to fill up the CB with items is called later. I can think of one ...