0
голосов
2ответов
333 просмотров

User Control Not Rendering When Used as a DataTemplate?

I have a usercontrol which I want to use as a DataTemplate in a Listbox. This works: <ListBox> <ListBox.ItemTemplate> <DataTemplate> <Grid x:Name="Grid" Height="100" Width="880" Background="LightGray"> <Grid.RowDefinitions> <RowDefinition...

0
голосов
1ответов
1321 просмотров

User Control Data Binding in Silverlight/MVVM

Do DependencyPropertys default to two way binding? If not how do you specify? The reason I ask is that I have the following user control which is causing me problems... <UserControl x:Class="SilverlightApplication.UserControls.FormItem_TextBox" xmlns="http://schemas.microsoft.com/winfx/2006...

10
голосов
2ответов
14031 просмотров

How to wire up a click event for a custom usercontrol button? Should I use CustomControl?

I wanted to create a button that had an image and a textblock as content. So I went about looking for an answer and found a post (Reusable Custom Content for Buttons) which told me to create a usercontrol. I did this and it works great. I can set the image source and text through dependency prop...

6
голосов
3ответов
6754 просмотров

App.xaml style cannot be used in Usercontrol, how come?

I have a style for a textblock that is set inside my app.xaml this is then applied to textblocked through out my application and works fine. However i get an error: "could not create instance of type" if i apply this style to a textblock within my user control, how come this is a problem? <U...

2
голосов
1ответов
2161 просмотров

Passing values from one Usercontrol to another UserControl !

hie guys. I have ParentPage which contains 4 user controls and i have user dropdown on each control. whenever i change the selected index .. all user control should populate according to the selected value of user. Can anyone kindly tell me.. how to pass the values to different usercontrol at sa...

0
голосов
1ответов
958 просмотров

Multiple data binding properties on ASP.NET usercontrol

How can I have multiple properties in my usercontrol that can be databound? For a single property I have found that DefaultBindingProperty Attribute does the trick but I have no idea on how to get databinding with multiple properties.

1
голосов
2ответов
368 просмотров

ASP.Net - Displaying a collection of controls

I am creating a simple form. I have created two simple classes, Question and QuestionSection. I then create some subclasses of question, e.g. SimpleQuestion, MultipleChoiceQuestion, with different behaviour and markup. QuestionSection has a property of a collection of questions, like so- priva...

6
голосов
1ответов
7083 просмотров

Does anyone have a simple example of a UserControl with a single ContentPresenter?

So far, I have this: <UserControl x:Class="MyConcept.ExpanderPanel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid> <Border Style="{StaticResource Border_PanelStyle...

0
голосов
2ответов
1640 просмотров

WPF: Error using a custom control in the ItemTemplate of another custom control

I have a custom control library where I have several custom controls that I use in my main application. I have a simple custom control that lets the user select pen thickness values from a combobox. Now, I am creating a new custom control, based on a listbox, and I want to include the pen thickne...

0
голосов
2ответов
1557 просмотров

Monitoring user tracking, statistics, and auditing for app

I'm trying to incorporate user statistics into a site and decided to go for this in my users table: time when the user registers time when the user verifies visit count time of last visit What other statistics am I missing? Should I track each login time in a separate table too? Is that consi...

0
голосов
1ответов
294 просмотров

Adding Control to Container Control that is in User Control - How to properly initialize?

Let's say I have a user control MyUserControl, which has a container control (it's a server control, but it could just be a Panel) and a dropdownlist. The dropdownlist is not in the container control initially. In it's code-behind, I am overriding OnInit and creating the user control, which inc...

1
голосов
1ответов
502 просмотров

Where can I find information about creating 3D controls in WPF?

I am about to start to make the interface for a game in WPF / Silverlight. I'd like it to have a nice look all in 3 dimensions. Can you point me to some good resources, tutorials, books... on how to develop real 3D controls, like Buttons and such?

4
голосов
1ответов
1103 просмотров

UserControl with Child Controls passed into a Repeater within the UserControl

I'm trying to achieve something along the lines of... UserControl (MyRepeater) <p>Control Start</p> <asp:Repeater id="myRepeater" runat="server" /> <p>Control End</p> Page <p>Page Start</p> <uc1:MyRepeater ID="MyRepeater1" runat="server"> ...

2
голосов
2ответов
320 просмотров

Observe event created through an instance of a Winforms UserControl

In my winforms app, I have a UserControl that contains a DataGridView. I instantiate and load this UserControl when needed into a panel in my Main Form (frmMain). My problem is figuring out how to resond to or listen for events raised in my UC's DataGridView. For example, I want to handle the ...

1
голосов
1ответов
233 просмотров

Databinding with WPF User Control

I've been Googling for it; but without any luck. I think this is fairly simple. I have a user control named TicketGroup. TicketGroup is the visual representation of a List object I have. The XAML code I've got looks like this. <c:TicketGroup Grid.Row="1" /> <c:TicketGroup Gr...

0
голосов
2ответов
2141 просмотров

WPF: How can I wrap a content control in another?

I have the following as the body of a UserControl: <Label FontWeight="Bold" x:Name="PaletteLabel" HorizontalAlignment="Stretch" BorderThickness="1" > <Label.Background> <LinearGradientBrush EndPoint="0.5,1" Start...

0
голосов
1ответов
99 просмотров

Share an object for Web User Controls (Asp.NET, C#)

I'm developing a Cms. There are some web user controls; TopMenu.asx SubMenu.ascx FooterMenu.ascx I do not want them to go Database for Site Map several time. 1 query is enough. Is there a way to do this without using an Session Object. Thanks

4
голосов
6ответов
5690 просмотров

ASP.NET Dynamically Change User Control Source

The Scenario I have an ASP.Net Web Project that uses a master page. This master page contains a menu in the form of a user control. Sometimes I want to dynamically change this to use a different type of menu user control. The current code to register the user control <%@ Register TagPrefix=...

11
голосов
2ответов
9413 просмотров

How to provide custom code for InitializeComponent?

When you modify column headers of a ListView at design time, the designer generates code to serialize column headers at run-time: private void InitializeComponent() { this.listView1 = new System.Windows.Forms.ListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); t...

5
голосов
4ответов
3731 просмотров

How do you render a User control from a ashx or webservice?

Question is it possible to have a .ashx or webservice return a user control rendered? if so how would i do this?

1
голосов
1ответов
1372 просмотров

How to create a different user category in SharePoint and a view designated only for them?

How do I create a different users category? (more restrictive - with view only properties)? How do I create a View - only for this category of users? I need to group some users into a view only category and then assign only ONE view to this group, so they can not see everything that is in ...

0
голосов
4ответов
103 просмотров

Determining which User Control to call based on browser

I have two user controls in my ASP.Net project, one that is explictly for use with Internet Explorer 6 (IE6) and another that should be used when the user's browser is not IE6. How would I go about setting it up so that this happens; is this something I can put in a master page?

0
голосов
1ответов
915 просмотров

Creating a default image in a UserControl

I have a User Control that has one child - an Image. I'm trying to set a default image using code in the User Control's default constructor to display an image resource, but so far with no success in either Blend preview or when I actually use it in a running app. I do not get any errors either. ...

5
голосов
2ответов
12992 просмотров

ASP.Net Declaratively Passing Value from Page Property to User Control

I need to find a way to declaratively (not in the code behind file) pass the value of a property in an ASP.Net web page to a user control. Following is a simple example of what I'm trying to do, but I can't get it to work. Here is the markup for the aspx page where I'm creating an object of the ...

1
голосов
4ответов
1872 просмотров

Secure custom login control ASP.NET

Problem: I want to create a custom log in control that posts securely to HTTPS without affecting other submit buttons on the page. If I had been writing this in ASP.NET MVC or any other language for that matter, I would just create a new form tag with an form action="https://...". Now I'm stuck ...

1
голосов
2ответов
372 просмотров

Generic Obeserver Pattern for User Controls

I want to implement a generic Observer Pattern for user controls. What is the best way to do this? There are 3 usercontrols: A, B & C. Each of these usercontrols is a representation of a set of data. Each control has a select for display mode (basic or detailed). The site visitore gets to c...

0
голосов
1ответов
249 просмотров

Why don't custom events show up in Blend for a UserControl?

I have created a UserControl, and added a couple of custom routed events. The problem is these events only show up in Properties->Events when I am manipulating an instance on the art board. If I am editing the UserControl itself, the my custom events do not show up in the Events panel. Is t...

1
голосов
1ответов
696 просмотров

Blend not rendering images in User Control

I am developing a WPF application, and I have created a user control called ViewIconUC. This control lives in an assembly (MyControlAssemblyUI). I can instantiate the control in a ZAML page within this control, and I get no errors (I even attached the dugger to Blend to check), and I can see the ...

2
голосов
1ответов
2333 просмотров

jquery UI Modal Dialog in asp.net usercontrol: Modal Overlay only on Div in UserControl

I have an asp.net usercontrol that contains a jQuery UI Dialog Control. All works as expected execpt the grey tranparent overlay (to make the form modal) only appears on the hidden div below the form where the dialog is triggered from. Is it possible to target this overlay to the parent div? or...

0
голосов
1ответов
620 просмотров

problem with parsecontrol

hi i have a problem with the parsecontrol() method Control c = this.ParseControl("<uc1:GroupListControl NickName='HARD' GroupName='STUFF' runat='server' ID='Abekat' />"); <-- error Unknown server tag 'uc1:GroupListControl'. Control c3 = ParseControl("<asp:button id='Button3' text='B...