usercontrols

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

Hi. 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 my list. SharePoint, so far, does not giv...

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(); this.columnHeader2 = new System.Windows.For...

Multiple user controls in one edit field for a DetailsView in ASP.NET

I have a situation where one detailView displays data which depending on the data's value needs to have a different user control for edit and insert on one of the fields. My initial instinct set the Edit and Insert template to be a Panel and then add the control to the panel on a databind event. This worked fine up to the point where ...

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

Hi, 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 ...

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" StartPoint="0.5,0"> <GradientStop Color="#FFB6B5C3...

Observe event created through an instance of a Winforms UserControl

Hi! 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 CellDoubleClick event of the DataGridV...

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"> <ItemTemplate> <p>Page Item Template</p> </ItemTemplate> </uc1:MyRepeater> ...

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? ...

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 includes populating a dropdownlist and adding...

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 considered good auditing or too much? There ar...

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 thickness combobox in the new custom control's It...

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"&gt; <Grid> <Border Style="{StaticResource Border_PanelStyle}" CornerRadius="3" /> <ContentPre...

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- private List<Question> _Questions = new List<Qu...

Multiple data binding properties on ASP.NET usercontrol

Hi, 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. ...

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 same time ... Thanks !!!!! ...

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? <UserControl x:Class="Client.Usercontrols.MyBut...

Custom Usercontrol Button, How to wire up click event? Should i use CustomControl?

Hi Guys, 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 (http://stackoverflow.com/questions/1568883/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 depe...

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/xaml/presentation" xmlns:x="http://schemas....

User Control Not Rendering When Used as a DataTemplate?

Hey folks, 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 Height="24"/> <RowDefinition Height="24"/> <Ro...

Wpf: Inherit code-behind Code

Hi, I have several similar user controls which display listviews of respectively different data entities. In the code-behind files of these controls there is quite a bit of common business logic. How can these common methods be combined in a single "super-class" as I would do in a normal non-wpf-case (reusing any xaml parts isnt necess...