custom-controls

How to invert the colors of a WPF custom control

Hello, I'm creating a custom control for my WPF application, and I'd like to know how I can invert the colors of the control when it's clicked. I've gotten it to respond to mouse clicks, but when I try swapping the background and foreground brushes, only the background color changes. The control is a die control and I want the colors ...

Changing a style of Silverlight custom control when another property changes

In WPF custom control I used to implement appearence changing of a custom control based on another property of this custom control with the help of Triggers mechanism, for example when my custom control changes its property AStatus to value Available its background color changes to Green: <Trigger Property="AStatus" Value="Available"> ...

How to customize a listview in Qt

I want to customize a listview in Qt, can anyone provide me some example or hints of how to do it? I am new to Qt. ...

Data templates in WinForms

Hey guys I'm trying to have a grid that has items that have a custom layout/feel. If you have a look at the following http://mdavey.files.wordpress.com/2007/05/ldmain.jpg this is kinda what I am trying to do (see the aqua/red pods on the left and the graphs on the bottom right). Under WPF/ASP.Net I would know how to do this but in WinF...

Best way of handling javascript within Custom Controls?

In ASP.Net I have a few custom controls I've made. I utilized jQuery where it helped also. Well, one problem I have now(with obvious, but "bad" workarounds) is that for each user control I need to execute some code from within pageLoad($(document).ready will not work with update panels). Well so now my problem. I need to have two custo...

Silverlight custom control ToolTip not showing up each time

In a Silverlight application I have a custom control with a number of custom properties. In the declaration class of the custom control additionally to defining its properties as dependency properties, I define showing a ToolTip: public override void OnApplyTemplate() { base.OnApplyTemplate(); Border bordercntr = bas...

Custom web control. how to render child controls

I'm trying emulate the IE Webcontrols Pageview system. Basically I have <c:Multipage> <c:pageview> [Block of ASP.NET / HTML] </c:pageview> (More pageviews)</c:Multipage> And I want to simply render the inner text of the pageview. I've tried protected override void AddParsedSubObject(object obj) { ... ControlList.Add((Control)...

Custom Control and Application in Same Project

I want to create a custom control in C# which I will use multiple times in my application, but will not likely use in any other applications. I have seen several websites which explain how to create a custom control and add it to the Visual Studio toolbox. They instruct you to create a project with the custom control which compiles to ...

DataGridView Custom Column with databinding support, unexpected behaviour on initial load.

I am trying to load a custom column (code below) in datagridview in winforms, the custom column binds a integer value into it and displays the integer value along with a unchecked checkbox in it: public class LabelledCheckBoxColumn : DataGridViewCheckBoxColumn { public LabelledCheckBoxColumn() { this.DefaultCellStyle.Ali...

DataBinding Not Working In My ASP.NET UserControl

<asp:Repeater ID="repFilter" runat="server"> <HeaderTemplate> <div id="posting" align="center"> </HeaderTemplate> <ItemTemplate> <div class="friends_area" id="record-"> <%# ((Ale...

List controls C#

I'm working on something like a download manager on C#, and I need to implement a download list that has to support the following features: 1] The list should support scrolling2] All the list elements have a url, and some other data + icon 3] Selection, and multiple selection. How can I implement this kinda of list? I there an already...

override page PreInit inside Custom server control

Hi, I have custom server control contains templatefield when an out button clicked the field disappear , when can I rebind the control (inside its class) supposed that Control.Page.OnInit+=new EventHandler(rebind()) doesn't do any things ? ...

Custom View not appearing

Here is the XML for the layout in which I want my custom view to appear. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/widget273" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:rs="http://schemas.android.com/apk/res/com.boo...

Building a DataTable to a custom control

Are there any tutorials around for how one would go about creating a control that can be bound to a DataSet? I can't seem to find anything much about it on Google. I've tried this, where my control has a DataRowCollection property called Items (and a dataset called ds, containing a single table): ctrl.DataBindings.Add("Items", ds.Table...

IlMerge Silverlight Class Library with Custom Controls

Hi, I am trying to merge all the assemblies of an class library in a single .dll file. I can merge all the assemblies using the Ilmerge but is that when I use the merged dll in a Silverlight application I am having trouble when a template is apply to my control and binding problems if I use a control that inherits with UserControl. is...

Custom Views take forever to inflate; inflate before show next screen possible?

I have some custom views that load when I start an activity with an XML layout containing them. They can be found in another thread, here: http://stackoverflow.com/questions/3392351/custom-view-not-appearing . The custom views take forever to load, and the Logcat is throwing a million warnings. I am considering just using a text button ...

ASP.NET Designer - How Do I generate this Design-Time Markup?

Hello, I want to generate this: <x:MyControl id="a" runat="server"> <Scripts> <x:MyScript .. /> </Scripts> </x:MyControl> I setup a control like: [ ParseChildren(true, "Scripts"), DefaultProperty("Scripts") ] public class MyControl: Control { [ PersistenceMode(PersistenceMode.InnerDefaultProperty), Mergabl...

How to implement IWindowsFormsEditorService in C# ? a.k.a Simulating In-Place Editing in Windows Forms.

I would like to implement a custom Windows-Forms based control similar to the Visual Studio property grid. For this, albeit much simpler. I would ideally like to replicate the behavior of the IWindowsFormsEditorService interface, that is used to trigger in-place editing in the property grid by calling client-specified UITypeEditor implem...

Lookless controls with multiple children in properties/parts (+ theming)

I've created a custom control for MahTweets which simplifies/unifies the look of each update across the various social network updates we support. In theory it also simplifies how to theme everything, because we can just create a style for the lookless control. public class StatusUpdateView : Control { public static readonly Depende...

Android: Custom button OnClickListener is not getting invoked

I have a custom button, on which I am capturing its onTouchEvent. public class CustomNumber extends ToggleButton { boolean drawGlow = false; float glowX = 0; float glowY = 0; float radius = 30; public CustomNumber(Context context) { super(context); } public CustomNumber(Context context, AttributeSet attrs) { super(context, ...