custom-controls

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

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

How do I add the style property to an ASP.Net custom date control?

I'm working with an already built ASP.Net custom date control, it seems pretty simple, but I don't know much about building custom controls. The control is a text box that pops up the ajax toolkit CalendarExtender when clicked. The html looks like this. <div style="display:inline; white-space:nowrap"> <asp:TextBox runat="server" ...

How can I display custom icon and two hyperlinks in model pop up on Blackberry map?

I need to display a custom icon and two hyperlinks in model pop up on Blackberry map. How can I do this? ...

[WPF] Nested RichTextBox

I am creating a small custom scientific editor using RichTextBoxes. User can insert a 'formula' UserControl which itself contains one or more RichTextBoxes, allowing insert more 'formula' controls - this replicates minimal functionality of MathType. When I insert the UserControl, it shows up alright but the RichTextBoxes are disabled wi...

Including Javascript with a custom control in an ASP.Net website

I have a custom date control which is essentially a text box and the ajaxToolKit calendarExtender. I want to include Javascript in the control and have it work properly no matter what page the control is on. The control is called DateControl.ascx So I have two Javascript functions, dateEditor_OnShown and dateEditor_OnHiding. They get...

How to make HyperLink in blackberry application?

Can anyone tell me how to make hyperlink in blackberry.If u have any idea pls share with me.If u can provide some code snippet. ...

Why does my ASP.Net custom control render two id attributes on my first child control?

I'm writing a small ASP.Net custom control inheriting from CompositeControl. The control is just a panel containing two subpanels with a label in each subpanel. When rendered, I am seeing in the HTML source that the first child control of my custom control gets two id attributes - the first being the id of the custom control itself and...

Silverlight custom control's content in scrollviewer

I have a Silverlight control derived from ContentControl. I use it in following way <local:CustomControl> <local:AnotherControl> </local:CustomControl> I want to have the content (i.e. AnotherControl) in a ScrollViewer. Without changing the above XAML usage, how can I have the content in scrollviewer? What modification do I need to m...

Custom Control in TextBox Help?

public partial class PreTextBox : TextBox { public PreTextBox() { InitializeComponent(); Text = PreText; ForeColor = Color.Gray; } public string PreText { set; get; } Text not set from PreText? ...

How can I swap controls based on a dependency property?

I am creating a custom control. I want the template for this control to use different controls for the root control based on the value of a dependency property called CanExpand. CanExpand is defined in the custom control class. If CanExpand is true, I want to display using an Expander: <ControlTemplate ...> <Expander ...> <!-...

How to figure out if other controls are constructed before OnInit

Hi, I'm making a custom control. Basically what I'm looking for is a OnPreInit event in custom controls. I basically need to know that all of the controls that will be loaded of type MyCustomControl are constructed or not. Ok, so basically I need to know in the constructor if the current instance being constructed will be the last. ...

How Can I Implement Custom Previous/Next Buttons Over MPMovieplayer?

I have implemented a listing of videos in a UITableView. When I touch on a particular video then the video plays in an MPMovieplayer. Now, I want to make it so that if I touch on a next button, then the next video in the UITableView will play. How can I implement this? ...

Blackberry - draw label in the center of custom ButtonField?

I created a CustomButtonField in blackberry using that i can able to set our own height and width of the button.The problem i m facing is i dont know how to show the label in the center of the button. ...

Does MFC have a built in grid control?

First what I want: The ability to display a grid with multiple columns, each cell having a custom render callback. So you might use such a control to display your inventory in a game, or something like the behaviour in Google Chrome where it shows a grid of popular pages you visit. I've been playing with CListCtrl and while I can get cu...

Create custom controls with inner html c#

how can i create a custom control that accepts a inner html, like the usual .net datagrid or ajax tabbed control... something like this: <KITT:tabs id="s" runat="server" > <w:tab sectionid="benefits"> here goes my html or any content, i want to render as is </w:tab> </KITT:tabs> I know how to create that with no inner html, a Tab ob...

Blackberry - how to add fields to listfield?

I am using ListField but encouter a problem. How can i view it as i wish (not one by one)? For instance, there is item1, item2, item3. Can i jump from item1 to item3 directly, ignoring item2? In another way, how to insert a text field (a labelfield, for example) into the ListField items? like this: item1 a textlabel item2 item3 ...

Develop a Form Designer Application

I have been tasked to create a form designer application in Windows Forms. The application will be used to layout "controls" on a page. The controls would most likely be images that can be resized and repositioned within the form. The result of the designer would be a file with the relative positions of the images or "controls" on the...

Deriving from a ScrollableControl, is there a way to always have the horizontal scrollbar visible?

Having a custom control deriving from ScrollableControl and using AutoScrollMinSize to set the inner display bigger than the viewport, the horizontal scrollbar shows as expected. However, sometimes I want the inner display smaller than the viewport but the horizontal scrollbar disappears. I know that's the expected behavior but what I w...

Resolving viewstate/namespace conflicts

Hi, I have a listbox control. When the user clicks it, it tells a custom control to use a certain ID to use. The custom control draws the same thing everytime(dynamically), just loads different content depending on this ID(it's loaded from a database into a dynamic form like control). Ok, Now I'm having trouble with viewstate spillage....