custom-controls

WPF Custom Control TemplateBinding

How do i define a TemplateBinding for my custom control? ...

How to Access a Button present inside a Custom Control, from the implementing page?

Hi, I have my generic.xaml containing the following code: <ControlTemplate TargetType="local:customVideoControl"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="600"/> <RowDefinition Height="200"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> ...

How make a control that look like the "download" dialog of firefox

I have a application that like firefox, can be enhanced from plugins available from internet. Now, I want to provide in Delphi (2010) a dialog similar to the download from firefox. I have no skills in build graphical controls. Using the standard controls of Delphi, what could be the best way... using a TListView/TStringGrid with custom...

Custom Control Overriding Command Button

I am trying to create a custom command button that defaults width and height to specific settings. I have the following code: public partial class myCommandButton : Button { public magCommandButton() { InitializeComponent(); } [DefaultValue(840)] public override int Width { get { ...

Accessing WPF Template for Custom Control from Code behind

Hi, i am trying to access a named grid inside a default template for a custom control from code behind. But it seems that the template for the control is null, even after calling ApplyTemplate(). Is that impossible inside the controls constuctor? Here's the code: Generic.xaml: ... <ControlTemplate TargetType="{x:Type local:TimeTableCon...

Button template with image and text in wpf

Hello, I want to create buttons with images and text inside. For example, i would use different images and text for buttons like 'Browse folders' and 'Import'. One of the options would be to use a template. I had a look at simliar question http://stackoverflow.com/questions/1933127/creating-an-imagetext-button-with-a-control-template ...

How to trigger SelectIndexChanged event to VListBox?

Somebody know the VListBox? It is fast to load item to the listbox. But I can't get the SelectIndexChanged Event be triggered by set SelectIndex. Somebody know how to trigger that event by winapi or something else? VlistBox source code is in the page above. ...

Issue binding Image Source dependency property

Hello, I have created a custom control for ImageButton as <Style TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Local:ImageButton}"> <StackPanel Height="Auto" Orientation="Horizontal"> <Image Margin="0,0,3,0" So...

wpf keep base style in custom control

Hello, I have created a custom button as i wanted an image and a text inside it as follows: <Style TargetType="{x:Type Local:ImageButton}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Local:ImageButton}"> <StackPanel Height="Auto" Orientation="Horizontal"...

Custom button template in WPF

I want to create a simple button template with an image and text inside it. But I want to keep the System button's look and feel. How do I create it, step by step? P.S.: I have already tried it with CustomControl in WPF and BasedOn property. ...

WPF - Which one is better? Style or User Control?

I wanted to know which one amongst Style and UserControl would be better to use in WPF? For example: I have created an image button in two different ways. One uses Style and ContentTemplate property is set. It uses one other class with dependency properties. The other way is I have created a UserControl which has a button and its cont...

how to create a black rounded-corners window in cocoa

Hi, How to create a rounded corners black window in cocoa? Is it standard and can be created by IB? Can somebody provide an example? Thanks in advance ...

validation control unable to find its control to validate

i have a repeater that is bound to a number of custom dataitems/types on the itemdatabound event for the repeater the code calls a renderedit function that depending on the custom datatype will render a custom control. it will also (if validation flag is set) render a validation control for the appropriate rendered edit control the edi...

User control disapear when added to a Panel

I've got a user control class that works fine, drawing, events firing and the works. When i programmaticly add it to a class that extends from Panel it disapears. I've checked around and the line that makes it disapear is the line where i go panel.Controls.Add(myuserControl). Without that line the control works just fine, does anybod...

Subscribe to the Button's events into a custom control

Do you know how can I subscribe to an event of the base of my customControl ? I've a custom control with some dependency properties : public class MyCustomControl : Button { static MyCustomControl () { DefaultStyleKeyProperty.OverrideMetadata( typeof( MyCustomControl ), new FrameworkPropertyMetadata( typeof( MyCustomCont...

How can data templates in generic.xaml get applied automatically?

I have a custom control that has a ContentPresenter that will have an arbitrary object set as it content. This object does not have any constraint on its type, so I want this control to display its content based on any data templates defined by application or by data templates defined in Generic.xaml. If in a application I define some da...

Giving event control back to xaml/callee to access check/uncheck

Hi All, I've scoured the Internet but my search-foo must not work if it's out there cause I just can't find the proper search terms to get me the answer I am looking for. So I turn to the experts here as a last resort to point me in the right direction. What I'm trying to do is create a composite control of a text box and a list box bu...

How to style a custom Silverlight 4 UserControl ?

I have a custom UserControl that I created as a navigation menu that parses an xml file and populates itself with hyperlink buttons. So basically my control is an empty stackpanel, and when it's loaded it adds hyperlinkbuttons as children to the stack panel. In my application I just add a <myLibrary:NavigationMenu links="somexml.xml" />...

Exposing some live data on a website - New to ASP.NET, need guidelines

I have a large .NET based system running within the company intranet, which allows winforms users to see some live calculated numbers and a custom winforms control drawn live (but not real-time). The Forms users can also affect the operation of the system. I would like to just show the live numbers on a website, along with the custom co...

Any reasons to recompile Silverlight 3 controls for Silverlight 4?

When I release a custom control which works in both Silverlight 3 and Silverlight 4 is there any reason to provide a separate binary version targeted at Silverlight 4? As far as I understand SL4 apps using SL3 controls run normally in SL4 mode but maybe there are some hidden benefits of recompiling controls for SL4 (or gotchas of not d...