control

File Control not working properly in google chrome

Hi All, file control works properly in IE and firefox but in chrome the text box for the file control does not appears. can anyone suggest why is this happening? Is there any specific reason? ...

Event Control Not working?

i careate button control and place in panel but not working? protected void Button1_Click(object sender, EventArgs e) { Button btn = new Button(); btn.Text = "Test button"; Panel1.Controls.Add(btn); btn.Click += new EventHandler(btn_Click); } void btn_Click(object sender, EventArgs e) { ...

Forcing a repaint of a WPF control

I currently try to create classes for a paint-like WPF application. I have to base classes LineMovement (line from StartPoint to EndPoint) and PathMovement (line going through all points specified in a property Points of type PointCollection). These classes inherit from Control and get their looks through a ControlTemplate. The ControlT...

Loading of controls outside of Page_Load is a no-no?

My apologies in advance for posting such a lengthy question. Believe it or not, what you see here actually represents a fairly condensed version of the problem/code at hand. And while I would appreciate any pointers on a better or different approach, I would also very much like to get the bottom of this so that I can sleep at night :)...

Can a C# control have a Design Time only property?

Hello, I wish to allow the user of my control to choose the licensing method for the control. The choice comes from an enumeration, so they must choose one of the methods I have laid out for them. This license needs to be chosen prior to the code executing at runtime. Therefore I wish for them to selected a value at design time. Fu...

Change control's parent at runtime vb .net

I'm making a custom control that can be dragged around and it is semi transparent. I need it so that while it is moving (the mousemove event) that if it intersects a control that its parent becomes that control. I tried to have it iterate through all the controls and if control.bounds.intersectswith me.clientrectangle then me.parent = co...

Make active control background colour change

I have a requirement to change the background colour of the active control (to make it easier to identify where the cursor is). I've tried using a style with a trigger on the IsFocused property but I'm not having any luck at all; it doesn't seem to fire. A XAML solution is most preferred. Any ideas? ...

What's the correct way to use controls in Owner drawn list box

I am experimenting with owner drawn list box. I am adding a text box to a specific item within list box. However, when I start scrolling, the text box does not display in the right location. What is the right way to do this? Here's the code I am using. Form1.cs using System; using System.Collections.Generic; using System.ComponentModel...

WPF freeform border control

Hi, i have to develop a wpf control which shall have the same behaviour as the well known border. The shape of the control shall be the new part. Every definable closed path shall be used to define the appearence of the control. I need help to achieve this. Currently i have no idea how to interchange the rectangle(??) with the closed p...

Disposing a control by calling its own BeginInvoke()

Disposing a control from by calling its own BeginInvoke() is a good idea or bad idea? Or shall I use the parent control or something like that to accomplish this task? I'm using Invoke because I'm accessing the control form another thread. ...

c# winforms: Getting the screenshot image that has to be behind a control

I have c# windows form which have several controls on it, part of the controls are located one on another. I want a function that will take for input a control from the form and will return the image that has to be behind the control. for ex: if the form has backgroundimage and contains a button on it - if I'll run this function I'll got...

WPF, Frame Control, HTML DOM Document access

Ive used WindowsHost to host a WebBrowser control, and that has allowed me to access the WebBrowsers Document/DOM directly, t read HTML content via mouse clicks on HTML document elements and also to invokes on submit forms. I never found a way even in Net 3.5 to do this when I was searching at the time. Ive found this post http://rhizohm...

using webbrowser to Interact with a Flash control???

using Automation (SHDocVw, MSHTML or something else?) or a WebBrowser control: 1)Is it possible to interrogate a flash control to discover its elements? For example, "http://demo.garanti.com.tr/bireysel_demo/main.html" there are flash buttons. Can I determine there "ID"s? 2)Given the "ID" names of elements in a flash control, is it po...

Scroll tab with the up and down keys (vb .net)

I have a tabcontrol with several tabpages. I would like it so that when I hit the up or dowm key, the selected tab page scrolls. Im just not sure which event that would be. Thanks ...

WPF ScrollViewer Elastic Effect

I want to build a custom ScrollViewer control, based on the original ScrollViewer of WPF actually, and I wanted to add an elastic effect to it! I tried methods like ScrollToVerticalOffset() but they won't go beyond the scrollable content of the ScrollViewer! I don't know how to exactly emulate the elastic effect (which is when you reach ...

Simple question - no results (ListView Columns)

Hello, I'm trying to accomplish what should be a very simple task using the ListView Control. All I am trying to do is add two Items to a ListView Control. One Item goes under the "Title" Column and the other Item goes under the "Status" Column. I have seen many examples for the ListView Control and none of them cover this particular ne...

WPF Custom Control and exposing properties thru DependencyProperty

Ok - I'm pulling my hair out over what I thought was a simple scenario: create a custom Label for bilingual use that contained two additional properties (EnglishText, FrenchText). Currently its structured like this: Public Class myCustomLabel Inherits System.Windows.Controls.Label Public myEnglishTextProperty As DependencyProp...

How do I customize the WPF StatusBar layout?

Adding more than one child to a WPF StatusBar results in poor layout with little option to customize. For example, this code: <StatusBar> <StatusBarItem> <TextBlock>Ready</TextBlock> </StatusBarItem> <StatusBarItem> <TextBlock>Set</TextBlock> </StatusBarItem> </StatusBar> Results in: This is not the ...

How do you wrap text around a user control?

I need to wrap text around a user control. Specifically, I am displaying an image in a user control. Normally, the align="right" would handle this on an image byu itself. But, put inside a user control, it doesn't seem to flow. I already tried putting the control in a div but this didn't look right either. ...

ListView version of ListBox.SelectedItem

hi all i'm trying to perform an action once the user double clicks on an item in the listview. but there doesnt appear to be any methods available for this. can anybody please help me out here? thanks lots :D ANSWER (Thanks to Kyle's link): private void listView1_MouseDoubleClick(object sender, MouseEventArgs e) { if...