July 31, 2013

I hit b, n and m and get "bn", "nm", "m,"

Problem
- I Hit "b" and get "bn"
- I Hit "n" and get "nm"
- I Hit "m" and get "m,"
- Microsoft Wireless Keyboard Problem in hit b, n, m
- Microsoft Wireless Keyboard 3000 problem with "b", "n" and "m" keys

Solution
Don't clean the keyboard with vacuum-cleaner, it's OK just replace your batteries
This is a pathetic sign for low battery i think so 

July 26, 2013

Prevent Show a UserControl in ToolBox

Problem:
- I don't want User Controls showing up in the toolbox
- How to put out a UserControl from Visual Studio ToolBox
- My user controls appear in tool box
- User control must not show in toolbox
- Prevent a base class from VS2012 toolbox

Solution:
Just Add these lines to top of your class.
PS: The first line is enough

[System.ComponentModel.DesignTimeVisible(false)]
[System.ComponentModel.ToolboxItem(false)]

July 24, 2013

Toolbox Icon For WPF Custom Control

Problem: 
- Displaying a custom Icon on the Toolbox for a Custom Control
- A Toolbox Icon for a WPF Control
- How to add a custom Toolbox icon to a WPF custom control In Visual Studio 2012
- Add a custom control icon to the tool box in VS2012

Solution:
I test more solutions but this solution helps me and it's simplest as i think so.
Just Add a picture file (not just bmp file) to a folder (not a specific folder) with these conditions
- Name: must be a full control name + icon + extension like below example
Structure: FullControlName.icon.ext
Sample Name: Project1.Control1.icon.png
Sample Name: WpfApplication1.Forlder1.CustomControl1.icon.bmp

- Right Click > Properties > Build Action > Embedded Resource (Just Embedded Resource no Resource or another one)


Test:
These icons just appear, when use of your DLL and in Design Time, visual studio just use of default icons.

- Go to ToolBox > RightClick > Choose Items... > WPF Components > Browse... > Add the DLL of your project and enjoy of ICON :-)


July 23, 2013

member is not valid because it does not have a qualifying type name

Error
'Property Name' member is not valid because it does not have a qualifying type name.


Solution
It's so simple, You must declare Type of property.
Just add the Namespace and class name before properties.

Sample
Before:
<Setter Property="Background" Value="{Binding Background}" />

After:
<Setter Property="Background" Value="{Binding amaControls:amaButton.Background}" />