custom-controls

WPF, Thumb cursor of GridViewColumnHeader not changed in custom control when resizing ?

Simplely derived from GridViewColumnHeader without styling, class SampleHeader : GridViewColumnHeader {} and use it like: <StackPanel Orientation="Horizontal"> <SampleHeader Content="Col1" /> <SampleHeader Content="Col2" /> </StackPanel> Very simple, but in runtime, the thumb cursor will not change to resizing cursor. I try to ...

UITabBarItem Selected Tab Background: Custom?

Would like to set a custom background for my selected tabs, thus far, subclassing is they way I'm customizing the UITAbBar/UITabBarItem. The question is: Does anybody know (or know where I could find ) what the property is that sets the background? There is a lighter black/grey rounded box around the selected tab. That is what I'm aimi...

Show suggestion in VS property window for a custom control property

I have developed a custom control with two public property called ListField and DataSource. ListField property must be set to the name of a property of the object contained in DataSource. It's possible to configure ListField in a way that when setting the properties in Visual Studio property window, I get a list suggesting the valu...

MVC Custom Control?

Hello! I am trying to figure out how to use/create a custom control in ASP.NET MVC 2. I created a custom control earlier and compiled it (ccontrol.dll), the control renders a div, textbox and a button + some javascript in order to post a comment on the website. It could be a static aspx page that i wanted to allow my visitors to add a ...

Stop containing button from handling input - Silverlight.

I'm working on a custom button where the content is sometimes a textbox. I'm doing this so I have a sort of edit-in-place where you can type text, hit enter, and then the textbox disappears and the button's text is what was typed. So as a simple case, you could mock this up like so: <Button> <TextBox /> </Button> The problem is i...

How can I expose a repeater's templates from another control that contains the repeater?

If I have a custom user control (say, MyCustomControl.ascx) which contains a number of other controls including a repeater, is there any way to expose that repeater's templates as templates for MyCustomControl? For example, I would want to be able to do this: <uc:MyCustomControl ID="MyCustomControl1" runat="server"> <ChildRepeaterH...

How to create horizontal menu in android ?

Hello Friends, I am working on horizontal menu that will open on top of the screen. Layout is something like following, || < || Menu Item1 || Menu Item2 || Menu Item3 || > || I want to put this on top of the screen. It can have more than 3 menu item and it can traverse through previous and next arrow. I started with like this, Relat...

Custom ListView to show EmptyDataTemplate and InsertItemTemplate at the same time

It is known that the ListView control can't display both an EmptyDataTemplate and a InsertItemTemplate at the same time. For my design style I need to be able to show both. I want to be able to show that no data exist and at the same time show a form to add new data. I've already implemented various solutions, such as putting a PlaceHo...

Zordering with custom items in a listbox - Silverlight.

I'm cooking up a custom button. This screenshot will be helpful. There's no problem with the button as seen in the image because the badge is hanging off to the left. But if I want the badge to hang off the right then the next item in the listbox will obscure the parts of the badge that go beyond the bounds of it's container (the width o...

How to Save Controls that are inside a form.

Hi this question or problem i have its very hard i have search and ask in the university and i have no idea how to make this happen, or even if it is possible. Here we go... I am making a photo or image editor with the variation of letting the user to insert buttons in top of the edited image(this buttons when clicked plays an audio fil...

Custom control cause Visual Studio 2008 to CRASH

The following code is a custom control. Using this control in the Visual Studio designer cause Visual Studio to CRASH without any noticeable details. I'm using Visual Studio 2008. Am I doing something wrong here? using System; using System.Text; using System.Windows.Forms; using System.Drawing; namespace InstalacionesSayma.GUI { ...

How to customize the UI display of a list item?

I want to add a prefix and surfix gradient panel to decorate the items in a list. I'm new to custom control and need a started point to do this. Please show me how to do it. ...

Vista Style DropDownMenu with TrackBar

In Windows Vista/7's windows explorer, the Icon Size selector has got a track bar in the DropDownMenu (see Fig. 1) Fig. 1: DropDownMenu with TrackBar in Windows Vista Does anyone know where I can get a similar UserControl or show me how to replicate it in .NET? NOTE: If anyone's wondering where the image came from, I captured it from...

WPF TextBox Validation Style Disappears when Mouse is over, or it has focus.

I am creating a custom text box control to have some default formatting and validation functionality, including a custom validation property which accepts an Action or custom function. In my current situation I can't use the Attribute validation framework that some people have posted, since I don't quite have access to modify the data m...

Help creating a Control

Hello every body, I'm trying to create a Watch Control and dont realy know where to begin. My goal is to able do declare a watch like this. <Watch Shape="Round"> <WatchButton Watch.Angle="70"/> <WatchButton Watch.Angle="90"/> <WatchButton Watch.Angle="120"/> <Cadran Shape="Round"> <Needle/> <Needle/> ...

Custome attributes in html

How to add a custome attribute to a HTML control. <input type="text" validate="xyz"></input> I want to add a new attribute to the HTML control. validate here is the cutome attribute. ...

Highlight Search TextBlock

My goal is to create a custom TextBlock control that has a new dependency property, SearchText. This property will contain a regular expression. All occurrences of this regular expression in the text of the TextBlock will be highlighted using a custom style (another DP). My current implementation involves clearing all of the Inline obje...

wpf how to fit textbox in rhombus shape control

Hi I have a userControl which pretend to be a rhombus shape control. On this control I have a textbox and label. Entire control looks like that <UserControl HorizontalAlignment="Left" x:Class="WPFDiagramDesignerControl.Components.UcWBSBlock" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.micro...

WPF: Custom TextBox control not using ErrorTemplate

Hey everyone! For the life of me I can not get my Validation.ErrorTemplate showing for my custom Textbox control. I tried adding an AdornerDecorator out of desperation because I read that helps sometimes. If anyone can help point me in the right direction, that would be amazing. I uploaded a sample project if someone would rather see...

How to override UserControl class to draw a custom border?

I would like to override System.Windows.Forms.UserControl to draw a custom border (e.g. using custom color). It's not possiblу to do usign built-in classes, because the only method/property you can affect the border behavior is BorderStyle. Overriding OnPaint the following way (code below) is not a good solution, because it's basically ...