usercontrols

Add animation when user control get visible and collapsed In Wpf

I have two xaml files MainWindow.xaml and other user control WorkDetail.xaml file. MainWindow.xaml file has a textbox, button, listbox and reference to WorkDetail.xaml(user control which is collapsed). Whenever user enter any text, it gets added in listbox when the add button is clicked. When any items from the listbox is double clicked,...

I have a CSS file in my App_Themes folder - how can I apply it to my web user control?

Any help? I can't seem to figure it out. ...

How do I encapsulate form/post/validation[/redirect] in ViewUserControl in ASP.Net MVC 2

Short verion: need ViewUserControl (i.e., Login Form) to post to self and be able to redirect (i.e., on successful login), or return original View (i.e., Home/Index) with validation summary and not interfere with other ViewUserControls on the page. Also, HomeController/Index should have minimal knowledge of Login Form's inner workings. ...

Custom Controls Properties - C# , Forms

Hi I m adding custom control to my flowlayoutpanel , its a sort of forex data , refresh every second , so on each timer tick , i m adding a control , changing controls button text , then adding it to flowlayout panel , i m doing it at each 100ms timer tick , it taking too much CPU , here is my custom Control . public partial class...

WPF Accessing Items inside Listbox which has a UserControl as ItemTemplate

I have Window that has a ListBox ListBox(MyListBox) has a DataTable for its DataContext ListBox's ItemSource is : {Binding} Listbox has a UserControl(MyUserControl) as DataTemplate UserControl has RadioButtons and TextBoxes (At first They're filled with values from DataTable and then user can change them) Window has one Submit Button ...

Find a better control

It is necessary to implement the following functionality: There is a rectangle "field", its size is 150x100 pixels. Field is split to locations, each location is 10x10 (totally 15x10 locations on the field). There are few "coins" (5, for example), each of them can be dropped into any location. The list of text messages should be displ...

button and drop down controls events firing every alternate times

I am having a drop down list and a button in user control. the button click event is registered dynamically. This event I registered is firing every alternating time. dont know the reason why it is behaving so. later added the selected index changed to the drop down list control. this also is getting fired alternate times. the user cont...

UserControl that is also a Grid in WPF

I would like to create a UserControl that will have some behavior(animated collapsing...) and some Controls in it (Rectangle, Ellipse, mostly for design purposes). However I need it to be a valid Panel like Grid so I can put more controls in it when designing main window. Controls that will be add to the new USerControl in main window d...

How can I use data binding in WPF to create a new user control for each element in a list?

I have a list of objects. For each item in the list, I want to create a new user control bound to that item. From what I've read, doing this programmatically is bad practice with WPF (as well as less than straightforward), so I should use data binding as a solution instead. The problem is, I can't figure out how to do this. I don't know ...

aspx listbox control

i tried to extend the listbox control and override its RenderEndTag method. everything works well if i used the control directly in a webapage. ie, the RenderEndTag is called. but when i try to put the control in a WebUserControl and use the webusercontorl in a webpage, the RenderEndTag of the extended control is not called. this is...

SkinId and Dynamic Control

Hi! I have some control that I add dynamically to my page: public partial class _Default : Page { protected override void CreateChildControls() { base.CreateChildControls(); var testControl = new TestControl { SkinID = "TestSkin" }; Controls.Add(testContr...

Enableeventvalidation in web user control

Hi, i have a web user control containing a repeater. The repeater contains three buttons. On button click it gives the following error : Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that ar...

custom events in child userControls c# .net or Child to Parent Communication in UserControls

Okay here is the scenario: I have a parent "SalesUC" UserControl which contains a "itemDetailsUC" UserControl, as well as a status label. (plz see sample below) What I want: If there occurs any exception in itemDetailsUC, it should be able to communicate the exception text to parent control (i.e. SalesUC). Remember: the "ItemDetailsUC"...

Close current UserControl

I have a Window1.xaml main Window and after same event I display a UserControl EditFile.xaml The code behind is: public static int whichSelected = -1; private void button1_Click(object sender, RoutedEventArgs e) { //searchEditPanel.Children.Clear(); whichSelected = listViewFiles.SelectedIndex; searchEditPanel.Children.Add(_E...

working with WPF usercontrol and MVVM

I have following questions Should the consumer of my usercontrol assign the usercontrol's DataContext or set some dependency property. (related to #3 : if DataContext then my individual items need to bind directly to the object given in DC, if DP then I have the luxury to have bind to any VM) If they set property, and if I am using 3 p...

How to access a value in another control

I have two controls on one page and need to access another control's values. I believe doing something like me.page .... something is along the correct lines but much help would be appricated! Thanks ...

GridView inside a UserControl

I am using a GridView inside a UserControl which has a template column for deleting the rows. Before databinding the gridview i am attaching the RowCommand and RowDataBound event. I am using the RowDataBound event to set the commandargument of the delete button. The event is being fired and works fine. When I press the delete button...

how do I map an asp.net user control property to a server control within it?

I have a user control with a WebDateTimeEdit server control on it (essentially a TextBox). I'd like to be able to set some of the server control's properties by way of the user control's markup or programatically. for example I have this defined on my user control: public string CssClass { get { return this.WebDateTimeEdit1.CssClas...

Problem deriving a user control from an abstract base class in website project

In a Visual Studio website, I have created a user control. This control is derived from a class (in App_Code) that is itself derived from System.Web.UI.UserControl. This is an abstract class with an abstract method. I then try to implement that method in the user control, but I get the following errors from Visual Studio: Error 1 ...

usercontrol hosted in IE renders as a textbox

On my ongoing saga to mirror the hosting of a legacy app on a clean box, I've hit my next snag. One page relies on a big .NET UserControl that on the new machine renders only as a big, greyed out textarea (greyed out vertical scrollbar on the right hand edge. Inspecting the source shows the expected object tag.) This is particularly tri...