I've made it a personal rule to inherit every UI control before using it. In a previous life I'd always considered this one of the less useful things you could do because the justification always seemed to be "I might want to change the font on all the buttons at once"... a motivation that never paid off... once... ever.
Two recent pro...
How can we refresh a web user control automatically without a page postback in asp.net 2.0? i have tried meta tags in controls head tag but it also refreshes the whole page.
...
I am using Scott Mitchell's textBox Characters and Words counter control, i downloaded it from the website http://www.4guysfromrolla.com/ and unzipped it to my desktop. then in VWD Express 2008, i created a new tab in the Toolbox, i chose the *.dll from the unzipped folder, i used the control, all is fine (try it, i recommend it) but whe...
I am looking for some information on how to properly implement data binding on a user created control.
My UserControl contains a Textbox, a Button, and a MonthCalendar. I am able to databind to the Textbox inside of my user control, however, I want to implement the databinding on the UserControl itself, and not reference to textbox ins...
How can invoke user control's public method from within the page?
I load the control dynamically inside OnInit on the page.Any ideas? For some reason I am getting a build error that says that the method doesn't exist, even though it's public. Starting to think that user controls are not worth all the hassle.
...
drop down list is not part of the user control.
I load the user control dynamically on the page inside OnInit event (where I have no knowledge whether the user has changed the drop down list selection or not).
I would also rather steer clear of Viewstate at this point, any ideas?
...
Hello, I'm not very experienced with .NET development, so forgive me if I've missed something obvious.
My scenario is quite simple: my program is going to deal with both the Imperial and Metric systems of measurement. I need an input control that will be able to elegantly house {feet, inches} and {meters, centimeters} (only one set at a...
Hi, this is a problem that regularly arises when I write Silverlight XAML. In this case, I've made a usercontrol VerticalTabStop (code attached) that has a ToolTip attached. I instanciate a couple of my usercontrols, and then I get the debugging window and the following error:
Line:52
Error: Unhandled Error in Silverlight 2 Application
...
I've got a WPF application with these three types of things...
WindowMain
UserControlZack
WindowModal
UserControlZack1 sits on my WindowMain...
<Window x:Class="WindowMain"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr...
I'm building a custom user control. One of the properties must allow the end user to select the numeric data type such as int, short, long, double....
I'm having a problem figuring out what to use as an internal property type, so that when the user selects the DataType option in the property box it will give them a drop down list of...
Is there any way to use a specific usercontrols depending on which theme the site is using?
Scenario:
I am using themes in my asp.net project. I am going to have same codebase and different look and feel and so using themes & skins.
Now the problem is if I want to have different headers & footers (which are usercontrols) depending on th...
I have read a bit about Design-Time Attributes for Components. There I found an attribute called CategoryAttribute. On that page it says that
The CategoryAttribute class defines the following common categories:
And then lists up a number of common categories. One of them are for example Appearance. I thought, brilliant! Then I can...
I have a custom control that I made. It inherits from System.Windows.Forms.Control, and has several new properties that I have added. Is it possible to show my properties (TextOn and TextOff for example) instead of the default "Text" property.
My control works fine, I'd just like to de-clutter the property window.
...
I've managed to get as far as redirecting content to my stackpanel as shown:
<UserControl
x:Name="taskItem">
<UserControl.ContentTemplate>
<DataTemplate>
<StackPanel>
<Label x:Name="labelHeader" Content="{Binding ElementName=taskItem,Path=Header}" FontFamily="Tahoma" FontSize="16" FontWeight="Bold" />
...
(This question is related to another one, but different enough that I think it warrants placement here.)
Here's a (heavily snipped) Window:
<Window x:Class="Gmd.TimeTracker2.TimeTrackerMainForm"
xmlns:local="clr-namespace:Gmd.TimeTracker2"
xmlns:localcommands="clr-namespace:Gmd.TimeTracker2.Commands"
x:Name="This"
DataC...
Is it possible to set up a listener in a Silverlight control to listen for events on the hosting aspx web page? I want to have several Silverlight and ASP.NET user controls hosted in a web page. I want to fire an event on one user control, sending an event to the host page (it needs to be notified), and then I want to broadcast an even...
Hi guys,
I have a set of UserControls that need to have a few similar properties. Thus I have defined an abstract subclass of UserControl that defines these properties and updated the .xaml.cs and .g.cs files to inherit from this base class. All compiles well and runs well. Great! But.... .g.cs files are generated and will be regenerated...
having a problem passing ViewData.Model to the partial views. It always is defaulting to null even if I equate it to a result query. I cannot access the strongly typed data because the Model is null. My current code is this,
ViewPage
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% Html.RenderPartia...
I have a custom user control named Field:
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Name="LblName"/>
...
In a C#, Windows forms app, we have a series of user controls that are associated with menu entry records in a database...
ID Menu Title
1 User Management
4 Group Management
6 System Utilities
12 Configuration Management
A few user controls...
UserManagement.cs
GroupManager.cs
SysUtil.cs
ConfigurationMan....