usercontrols

Passing Generic lists to a WPF usercontrol

I want to create a usercontrol that takes lists of different objects. These objects would be assigned to the control at design time. Now I want to be able to use linq to object to sort this list inside the usercontrol. Can anyone give me any ideas as how to go about it? ...

ASP.NET Ajax modal popup extender within a custom user control display issues

Hey guys, Currently I have a custom user control and within it is a little form and a modal popup extender, the idea is for the user control to be loaded dynamically in the parent page and displayed so the user can fill out the form and submit it and all the submission code be handled on the user control the problem I am having is when...

UserControl exposing multiple content properties! How exciting that would be!

I am trying to create a UserControl that will hopefully be able to expose multiple content properties. However, I am ridden with failure! The idea would be to create this great user control (we'll call it MultiContent) that exposes two content properties so that I could do the following: <local:MultiContent> <local:MultiCon...

Is there an attribute that ignores a method on design-time?

Something like: <DesignTimeHidden()> _ Private Sub UserControl_IsVisibleChanged(sender As Object, _ e As DependencyPropertyChangedEventArgs) Handles Me.IsVisibleChanged End Sub ...

Can't read asp user control parameters

I'm driving myself nuts with this particular problem, i really hope someone can help! In the below example i cant get the value of "4" to appear in the rendered page. The output from below compiles and executes just fine but all three of the values shown are "0". Here's a short snippet: (hopefully I'm formatting this correctly) (from ...

Difference between Partial VIews and User Controls in MVC

Can anyone please tell what's the exact differences between partial views and user controls in an MVC app? Which one is feasible to use? I am using user controls for filling my views which have one or more tabs(which i have added using Ajax control toolkit). I want to know about advantages/disadvantages while using partial views and user...

ASP.NET MVC 2 user control caching

Hi guys, I've recently decided to try out MVC 2 and coming from a webforms background, I'm having a little trouble trying to figure out the best practice solution to caching data provided to a partial view (user control). In my webforms application, I have an AccountSummary.aspx page, which has a Booking.ascx control. Booking.ascx had ...

User Control - Custom Properties

Hello All, I have developed a User Control in Visual Studio (WinForms C#) and have a question. I need the user of my User Control to be able to change certain string values and I would like them to be able to add the user control to their Form and click on it to bring up the Properties Pane where my User Control's custom properties wil...

WPF Usercontrol, Textbox not PropertyChanged event not fireing.

I have a usercontrol with the Dependancy Property of "Answer" which is attached to a textbox. I have queried the database and bound the answer to the usercontrol and the correct value is displayed. The issue occurs when i edit the textbox, the PropertyChanged event is not fireing and thus preventing me from saving the correct value bac...

Safe user control hosted in IE 8

Hi everyone, Since Internet Explorer 8 has added its new UI-less URLAction to check the .NET MIME Filter, mscorie.dll, for content from the Internet zone, i have to register my web server to the trusted site's list to load my user control (C# framework 3.5). But I can't touch the client machine's configuration, so i need to make this w...

CHeckboxList Updating dynamically and styling

I'm adding items dynamically when a row is selected from GridView. 1. How can i make the items added are selected by default - (solved) 2. How can i avoid duplicates getting added to list 3. How can i remove them from list when user un-checks them. And I want to change checkbox with an image and I'm using css like following but it i...

WPF seemingly super-simple dependency property

I'm puzzled. I'm trying to create a user control called TranslationView. It consists pretty much entirely of a single ListView. I don't think that's important now however, because I cannot even compile my code-behind. This is the code-behind for the user control: namespace Subster { /// <summary> /// Interaction logic for Tr...

Collapse/Visible UserControls on ButtonClick with MVVM - no swap mechanism -

Hello, In my scenario I have a MainView + MainViewModel, UserControl1 + UserControl 2. In the MainView I have 2 buttons labeled: Button_ShowUserControl1 + Button_ShowUserControl2. At the lower part of the MainView I have a "ContentGrid" which takes/should_take... every UserControl. My goal: When Button_ShowUserControl1 is clicked Us...

using LoadControl with object initializer to create properties

In the past I've used UserControls to create email templates which I can fill properties on and then use LoadControl and then RenderControl to get the html for which to use for the body text of my email. This was within asp.net webforms. I'm in the throws of building an mvc website and wanted to do something similar. I've actually consi...

How to create a control like Solution Explorer in Visual Studio?

Hi! all. I want to create control that seems and works like Soltion Explorer. I mean not the functionality of solution explorer, the control sholud be seems like that control. That means, server explorer, toolbox, error List,... All these controls will pop-out when we put mouse and pop-in when we leave. we can lock and unlock those co...

WPF usercontrol and external events

Hi everybody, I'm a rookie in c# and I'm working on a player with an specialized card. I've work on a usercontrol with the typical buttons stop play, pause and record. The problem is that I don't know how to create the events such that from the principal code (Window) I could manage and call the correspondent function, since from the use...

ASP.NET: Getting markup for .ascx

Let's say I have an a .ascx user control. How do I get its HTML markup into a string? ...

UserControl Combined ListItems & ContentTemplate

Is it possible to build a UserControl that takes both ListItems and a ContentTemplate? Something like this: <Custom:UserControl ID="ucTest" runat="server"> <Items> <asp:ListItem Text="Test1" Value="1" /> <asp:ListItem Text="Test2" Value="2" /> </Items> <ContentTemplate> Here is some content!<br/> <asp:Button ID="bt...

Creating Silverlight UserControl

I'm creating a silverlight user control that I should be able to drag and drop via blend. But this control needs to accept a map that is already on the page. For eg. Main.xaml contains a map control. MapEditor.xaml contains buttons and other controls. In the .cs file, it needs to access a map control (the one in Main.xaml). How do ...

Using generic types with an asp.net user control

The other day I built a user control that dynamically builds a data display from a given custom business object. It works well but I'd like to use the control in other applications and the way it is currently encapsulated is sub par. My custom user control just contains the basic html controls and a few internal properties so I can ac...