dkloeck
asked on
Button designer, strange behaviour
I create a Button from the compact framework (well..an extension) and it creates following line:
this.iconButtonPrint.UseVi sualStyleB ackColor = true;
in the xxx.Designer.cs file
UseVisualStyleBackColor is not part of the COmpat framwork, or so it sais, and does not show anything in the designer. How to do not make it creaet it?
this.iconButtonPrint.UseVi
in the xxx.Designer.cs file
UseVisualStyleBackColor is not part of the COmpat framwork, or so it sais, and does not show anything in the designer. How to do not make it creaet it?
ASKER
There is a class IconButton which is child of button (in a CF project)
Then there is another IconButtonPc which is child of IconButton (not in CF)
and the last is what I use, but since it derives from a CF project button, shouldn't it have all the properties from the CF, and not the ones for PC?
Then there is another IconButtonPc which is child of IconButton (not in CF)
and the last is what I use, but since it derives from a CF project button, shouldn't it have all the properties from the CF, and not the ones for PC?
The way I see it IconButtonPc relies on the implementation of IconButton (which CF control). The trouble is that you are attempting to create a desktop project and Visual studio will put UseVisualStyleBackColor since the project is desktop not CF. When you compile though the basec lass of button (CF) will be run and code in there doesn't have UseVisualStyleBackColor .
That is what I believe is happening? May I ask why you are mixing CF and desktop development?
That is what I believe is happening? May I ask why you are mixing CF and desktop development?
ASKER
Yeah, that's the problem. Do you know how I could solve it?
I'm using CF and desktop bcos its an application for PDA and PC.
Why is it that VS adds Desktop properties if I am extending a CF type, even if it is in a Desktop project?
I'm using CF and desktop bcos its an application for PDA and PC.
Why is it that VS adds Desktop properties if I am extending a CF type, even if it is in a Desktop project?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The bad thing is that after rebuilding it, the line apears again :(
I haer that the CF project template has errors. Can you not comment the line?