usercontrols

How best to embed multiple Flash Player instances using swfobject via a usercontrol?

I have a ListView on a Page within a MasterPage and some very ugly ugly autogenerated IDs. Such as..."ctl00_workbenchPlaceHolder_ListView1_ctrl1_LibItem2One" Using swfobject.embedSWF(...) requires me to hand over the id of a div on my page that can be replaced with object/embed markup depending on the browser context. My aim is to sho...

DependencyProperty Callback-Method not called

Hi, I create a UserControl (TableWithFilter.xaml) with a dependency property (source). The UserControl is a Table with a source property for the different items. I created the XAML and set the source property via the XAML Binding. So far so good. But if the value of the dependency property is changed, the defined callback method is not...

Loading user control in Medium Trust environment

I am trying to load a user control dynamically using this code: UserControl homePageContent = Page.LoadControl(userControlPath) as UserControl; I get the following error on the above line when the trust level is Medium: System.Security.SecurityException: Request failed. at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, ...

public datagridview within user control is "locked" during design time when subclassing

I have a user control that has among other things a label AND a textbox control. With this class, I set the textbox to have its modifier as "public", so when I subclass THIS control, I can get directly to the properties and such of the textbox in each instance where needed. No problem. Now, the problem. I do the exact same thing but ...

C# User Controls: access controls properties

I have created a control and added a TextBox inside that control, I am attaching that control to a .aspx page via <%@ Register Src="../UserControls/AccountSearchControl.ascx" TagName="SearchControl" TagPrefix="csr" %> and <csr:SearchControl ID="AccountSearchControlBox" runat="server" OnSearchButtonClick="RetreiveAccounts" /> On ....

Can I create a asp.net webform -or user control- output from an XML file by using XSLT?

Hi, Basically the thing I would like to achieve is to produce a form with some check boxes which will have their texts, default values from an xml file. As an example the block below should result 3 checkboxes (Use Sword, Use Shield, Use Spell) with the default values assigned. And when that form is posted back I can read them on the co...

Literal content is not allowed within a UserControl

How to allow my control contains a text inside it's tags? <uc:My runat="server">Text</uc:My> My control contains a complex table and I want to put Text into one of cells. How to do that? ...

Is there any way on how we could detect and get the attributes (which do not have properties) from a user control tag?

<uc1:UsercontrolTest ID="UsercontrolTest" runat="server" Hello="World"/> You see, Hello is not a property of UsercontrolTest class, but we need to detect and get that attribute. Are we allowed to do that? Thanks. ...

Is it possible top opt-out of INamingContainer if it's implemented by a superclass?

The UserControl class inherits from TemplateControl which implements INamingContainer. Since this is "only a marker interface" I was wondering if it's possible to opt-out of the behavior that this interface brings with it. I am developing a templated control based on a user control, and I want the controls inside the template to be acce...

Changing the orientation of a Win control in VB .Net

I need to allow the user to rotate a control (the control inherits from a TextBox) in 90 degree increments so the text can be read from either side, or even upside down. I'm guessing I could override the control's paint event and just paint it in the orientation that I want, but I'm just wondering if there's a quicker/built-in way? Thi...

how to remove unnecessary properties from user control?

hi all, i want to remove unnecessary properties from user control. But I do not know what way? ...

Silverlight - User Control Binding

Hello, I am learning Silverlight. In the process, I'm trying to build a custom user control. My ultimate goal is to be able to write the following statement in XAML: <my:CustomControl> <my:CustomControl.MainControl> <Canvas><TextBlock Text="Hello!" /></Canvas> </my:CustomControl.MainContent> </my:CustomControl> The content of...

How to implement a C# custom server control?

I am trying to implement a custom control using a RowClickableGridView class provided on this Stack Overflow post. This is the first time I have tried to create a custom server control and followed steps laid out in this MSDN walkthrough. I have the RowClickableGridView class in the App\_Code directory of my Web Application Project with...

Cannot see named Silverlight control in code

In my first few hours with Silverlight 3, as an avid WPF user, I am greatly disappointed at the many things it doesn't support. This seems like an odd issue to me and it's so generic that I cannot find anything online about it. I have the following XAML: <controls:TabControl x:Name="workspacesTabControl" Grid.Row="1" Background="Antiqu...

ASP.NET user control and accessing a property from Javascript ?

Hi This I can't work out I have ASP.Net user control,which is basically two drop downs, that has a public property Index which is calculated from the drop downs, and works fine I need to access the value of 'Index' from javascript, but accessing via getElementById was completely wrong, can anybody point me in a better direction Cheer...

Events from UserControl as ItemTemplate in WPF ListBox

In WPF, I have a ListBox with a UserControl as its ItemTemplate - all data shown ok. I have now added a text box for input in that user control. In an MVVM design, I want to take some action (re-calculate values) in the main window when the user edits the content of the text box in the user control, in the item template, in the list box....

WPF:MoveableControl

hi , i want that at run time i can move any control in using mouseclick, i think i have to apply logic in mousedown and mousemove event but how can i apply this logic in WPF i tried this logic in simple C# desktop application but how can i achive in WPF ...

Complex .Net 2.0 Windows Forms control: where to start?

In order to make a convenient UI for an .Net 2.0 Winforms application I am working on, I have need for a control that I'm pretty sure goes beyond the "out of the box" behavior of any standard control. A mock-up of what I'm trying to achieve follows: Essentially, this part of the application attempts to parse words into syllables from ...

Running a WPF User control or Managed Directx control on JFrame

If I have developed a user control as mentioned in the tile and I use this http://www.ikvm.net/ to convert my .dll to a Jar file, Can I then embed that control on my JFrame? If so can you give an example please. ...

Data binding custom control with parent

I have a UserControl that contains a listbox. On the parent window, I have this UserControl and a button. Ideally I'd like to use the ChangePropertyAction behavior on the parents button, and tie it to the UserControl's listbox count. The idea being that if there are no entries in the listbox inside the usercontrol, the button on th...