WPF in windows forms : Delete key is not working - c#

As title suggest, i have wpf user control hosted in windows forms application. Text box in user control doesn't seem to accept "Delete" key. Most of other keys are working fine.
Google search pointed to two useful links :
Link1 : Not useful as it works only for window and not user control.
Link2 : Not able to follow it completely as i am not much aware about windows messages and its interoperability.
Thanks in advance !

Does the key work in WPF project?
If you're using "KeyPress"-event, change it to "KeyDown"-event instead, so it can read "Delete"-key too.

If you are using a different event use the PreviewKeyDown event.
Also, is it working in a normal WF app ?

Related

Adding custom suggestions to Windows Phone keyboard Word Flow

I want to add some custom controls to the word flow just like the 6tag app
Any hint is appreciated.
Thanks.
Windows Phone doesn't support adding custom dictionaries or responses to the soft keyboard itself.
What you can do is add your own control above (but outside) the soft keyboard to display your own suggestions. The app can handle the InputPane.Showing event to find the location of the input pane so the app can place its controls just outside the occluded rectangle.

How can I set focus to explorer in C# WindowsApiCodepack, when used in WPF via WindowsFormsHost

i´m writing a small C# Wpf application and I integrated the ExplorerBrowser of the WindowsApiCodepack.
This is working really nice.
The only problem I have and where I haven´t found a solution so far is:
How can I programatically set the focus (keyboard focus) to the ExplorerBrowser control, so that I can select a folder without clicking on it with the mouse before?
Does someone have exerience with the control?
Additional Note:
What I found out so far is, that focus problems are a common problem for winform controls, which are inserted into a wpf window via the WindowsFormsHost class.
But i haven´t found a good workaround so far.
I don't have a clue about the WindowsApiCodepack, but I think u just have to call the ".Focus()" function of the control.

Own controls similar to TextBox in C# Windows application

Create own TextBox, Button etc control as own control using User control in C# Windows application, is this good idea?
I wanted make consistency for through out the application. Suppose if I want to change the Textbox border color then all forms textbox updated with this changes. It's just an example.
Please suggest me.
I don't recommend using UserControl just for consistency. If application skinning is what you are after, look into WPF. It makes it relatively simple to skin an application (or even a window, or smaller groups)
Here is an article on skinning with WPF: http://www.codeproject.com/Articles/19782/Creating-a-Skinned-User-Interface-in-WPF
Another alternative, staying within Windows Forms, is creating a class that inherits from TextBox, and using that class throughout the application. The Factory pattern would work well here. You could even adapt it to multiple skins.
It's not a bad idea to provide custom controls that match your "User Experience" (UX). It really just depends on what you are trying to accomplish with your program.

What "growl" type notification windows are available for WPF (windows that appear and fade after X seconds)?

I wanted to know if there are any good "growl" type notification windows available as open source or guided tutorials for WPF applications. I'm looking for a window that can appear when users save for example, notifying them that the save was successful and then disappears after X seconds (with a fade out) without the user needing to take the explicit action to close the notification window. This way for messages/notifications that require no confirmation, like the example, the user would not have to click "OK" to make the messagebox or dialog close.
This link could help you:
http://www.codeproject.com/KB/WPF/wpf_notifyicon.aspx
It is a Pure WPF implementation of the NotifyIcon class from WinForms and supports almost everything normal WPF controls do :)
Cheers
Why don't you use GrowlForWindows?
You can use C# or VB.

How to setup feedback link on Windows Forms caption using C#?

I would like to setup Feedback link on every windows form, so that user can send suggestion about design, functionality etc.. using C# (.NET 3.5) but I could not find solution.
Any help or suggestion will be appreciated.
On every form? You could create a "FeedbackLink" UserControl, and place that whereever you like. I wouldn't recommend trying to do it as a clever blanket-thing, because you can never assume the place you want the feedback hyperlink won't be used by something else.
My suggestion would actually be to add it to the "Help" menu on your main form, and possibly in some kind of (very intrusive) pop-up dialog. Maybe do it the way Visual Studio tackles it - by putting an icon in the systray with a bubble that pops up for the user to click on?
Example image (might take a second or two to appear):
Example http://www.freeimagehosting.net/uploads/b7939d58ae.png

Categories