I have a main window with a usercontrol. When adding code in the default constructor of the usercontrol, the designer stops showing the main window. It gives a message:
Problem loading
The document contains errors that must be fixed before the designer can be loaded.
Reload the designer after you have fixed the errors.
...
Is there some setting in VS2K8 or some command line utility that can compile my user controls as .net assemblies? Is it even possible?
...
How do I get my OwnerDrawn UserControl to respect the users dpi (96/120/xxx) and/or font-size (normal, large, extra large)?
Some people suggest to use the DpiX and DpiY properties on a Graphics object, but that doesn't seem to to anything in my control (i.e. they are always set to 96, regardless of which font-size or dpi I choose).
The...
I have a usercontrol that provides voting buttons (for a SO type voting model) - it contains a private int member that retains the id of the record. Outside a repeater, it functions just fine - postbacks work, and the correct id is retained in the user control.
Inside the repeater, an itemdatabound event handler associates the correct ...
Is there a standard control that lets a user edit the key-value pairs of a String to String Dictionary?
If not, how would you implement one? I've got a few ideas but none of them seems great.
...
How can I create a UserControl in WPF that has a basic default style but can also easily themed when needed?
Do you have some good guidelines, blog entries or example that explain this specific topic?
Thank you in advance,
Marco
...
I have a user control (.ascx) in my project that I am adding to a page programmatically in the page's Page_Load event handler, like so:
Controls.Add(new MyProject.Controls.ControlWidget());
Databind();
When I try to access the control's child controls from within the control itself, they do not exist.
public override void DataBind()...
I have specified a userControl as a dataTemplate.
<TabControl IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=Pages}">
<TabControl.ContentTemplate>
<DataTemplate>
<uc:ItemTemplateControl />
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
The userControl is very easy and just binds...
Hi Stackoverflowers
I Have a UserControl called TenantList.ascx which contains a slightly modified GridView from DevExpress (Web.ASPxGridView). This control makes Callbacks without causing a postback which is exactly what I need.
The specific event I need to react on is CustomButtonClicked. I have made my on OnCustomButtonClicked event ...
Hi,I have a usercontrol.Inside usercontrol I have a datalist and sqldatasource.Sqldatasource needs a parameter to databind the datalist.Usercontrol gets a paramter by this way,
private string _urunIDparam;
public string urunIDparam
{
get { return _urunIDparam; }
set {_urunIDparam = value; }
}
And then thi...
I have a UserControl which contains voting buttons inside an UpdatePanel, and outside a Repeater, it works perfectly. In the repeater, clicking the button fires off the appropriate event. That event is supposed to update the text of a control within the User Control, and that update should be reflected when the UpdatePanel refreshes.
If...
I have been asked to build a custom wizard control in VB.NET for a windows forms project. It has been made very clear to me that I am not "allowed" to utilize existing wizard controls on the internet due to some obscure logic surrounding copyrights. It has also been made clear to me that we are not "allowed" to use usercontrols in the ...
Hello,
I need to edit a complex object with complex properties using a web form. For example, editing a "User Information" record that contains all kinds of information about a user, including complex things like a unique tree for each user.
What I did was this:
I created a web form with a Formview control, and set the object I want to...
I have the same problem as in the question Programmatically added User Control does not create its child controls.
After reading the question and answer I changed my code which now looks like this:
foreach (ITask task in tasks)
{
TaskListItem taskListItem = LoadControl(
typeof(TaskListItem),
new object[] {task}
...
I would like some code to execute at the "preload" stage of my usercontrol's lifecycle. However the preload event is only available on the Page object. So, I added the following method to my usercontrol:
Private Sub Page_PreLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Page.PreLoad
However, I know get the compile...
I am creating a user control that contains a panel as well as 4 string and integer properties. I would like to display the text of the properties in the user control during design time. How do I do this? I am having a hard time finding examples.
...
I have a UserControl that is working fine. It is declared like this.
public partial class DynamicList : System.Web.UI.UserControl
{
protected static BaseListController m_GenericListController = null;
public DynamicList()
{
m_GenericListController = new GenericListController(this);
}
}
Now I...
Hi everyone
I've made a custom control, it's a FlowLayoutPanel, into which I put a bunch of other custom controls (just Buttons, each with three Labels and a PictureBox overlayed)
It works ok with around 100 buttons, but bump that up to 1000 and it's in trouble. Bump that up to 5000 and it just dies after 20 seconds.
I have very littl...
I'm getting a stack overflow when tryin to set a public property in a MasterPage from an ASPX page.
I'm making a "greeting card" editor, using a TabContainer. Each tab has a user control, and everything is updated when active tab is changed - while doing so I need to store all the data away in master page properties.
From the ASPX pag...
I have this Create Event form (asp.net mvc), and i have to change some parts of the form, depending on user's choice. When the user clicks radio buttons, different user controls (ascx files) should be injected inside the form hopefully using Ajax. Any suggestions to do this?
...