Click here to Skip to main content
16,005,552 members
Home / Discussions / C#
   

C#

 
QuestionUrgent Help needed for reflection Pin
subbucs5-Dec-05 14:26
subbucs5-Dec-05 14:26 
QuestionWhat's up with this new Loader Lock exception? Pin
dxben5-Dec-05 12:10
dxben5-Dec-05 12:10 
AnswerRe: What's up with this new Loader Lock exception? Pin
leppie5-Dec-05 12:23
leppie5-Dec-05 12:23 
GeneralRe: What's up with this new Loader Lock exception? Pin
dxben5-Dec-05 14:38
dxben5-Dec-05 14:38 
QuestionCalling a Win32 api in C# - urgent! Pin
spellman5-Dec-05 10:59
spellman5-Dec-05 10:59 
AnswerRe: Calling a Win32 api in C# - urgent! Pin
Christian Graus5-Dec-05 13:07
protectorChristian Graus5-Dec-05 13:07 
AnswerRe: Calling a Win32 api in C# - urgent! Pin
Judah Gabriel Himango5-Dec-05 13:51
sponsorJudah Gabriel Himango5-Dec-05 13:51 
QuestionCodeDomSerializer and Custom Control Pin
Dmitry G. Vorochek5-Dec-05 10:07
Dmitry G. Vorochek5-Dec-05 10:07 
Hi I've got a problem with CodeDom Serialization. Could anybody HELP me?
Please spend some time to read the description 'cause I spent 5 days to find clasic solution and I don't have it yet. Smile | :)

I've got custom control:
[DesignerAttribute(typeof(MThemeControlDesigner)), DesignerSerializer(typeof(MThemeControlCodeDomSerializer), typeof(CodeDomSerializer))]
public class MThemeControl : System.Windows.Forms.UserControl

it has property:
[Category("Appearance"), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ControlColors Colors{get{return _theme.Colors;}}

there is ControlColors class declaration:
[TypeConverter(typeof(ControlColorsTypeConverter))]
public class ControlColors
{
..........
public ColorSet AddColorSet(string Name, ColorSet BaseColorSet) {....}
......
}

I would like to have next code into Form Designer generated code:
this.mThemeControl1.Colors.AddColorSet("ColorSet1", this.mThemeControl1.Colors.ColorSets["Default"]);
It isn't so difficult, BUT:

When I try to switch to Design mode, I've got an exception:
C:\Work\C#\WindowsApplication1\WindowsApplication1\Form1.cs(65): The designer cannot process the code at line 65: this.mThemeControl1.Colors.AddColorSet("ColorSet1", this.mThemeControl1.Colors.ColorSets["Default"]); The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.

When I try to trace Deserialize method of MThemeControlCodeDomSerializer - i cannt do i 'cause exception throws early. When I try to trace any method of MThemeControlDesigner - the same. Frown | :(

HELP me please! What shall I do?

I didn't apply Serializator code 'cause it's very simple code, just append some CodeStatement expressions (...MethodRefenece and like this...)

AnswerRe: CodeDomSerializer and Custom Control Pin
Dmitry G. Vorochek9-Jan-06 5:37
Dmitry G. Vorochek9-Jan-06 5:37 
QuestionPressing the X Button Pin
TheMajorRager5-Dec-05 9:10
TheMajorRager5-Dec-05 9:10 
AnswerRe: Pressing the X Button Pin
Dan Neely5-Dec-05 9:14
Dan Neely5-Dec-05 9:14 
GeneralRe: Pressing the X Button Pin
TheMajorRager5-Dec-05 10:12
TheMajorRager5-Dec-05 10:12 
GeneralRe: Pressing the X Button Pin
J4amieC5-Dec-05 21:56
J4amieC5-Dec-05 21:56 
GeneralRe: Pressing the X Button Pin
TheMajorRager6-Dec-05 6:26
TheMajorRager6-Dec-05 6:26 
QuestionEasy forms question Pin
melanieab5-Dec-05 8:40
melanieab5-Dec-05 8:40 
AnswerRe: Easy forms question Pin
Dan Neely5-Dec-05 9:11
Dan Neely5-Dec-05 9:11 
AnswerRe: Easy forms question Pin
Alvaro Mendez5-Dec-05 9:41
Alvaro Mendez5-Dec-05 9:41 
QuestionListview column resizing problem Pin
Dan Neely5-Dec-05 8:27
Dan Neely5-Dec-05 8:27 
QuestionIs it possible to remove existing graphics from an image? Pin
Gulfraz Khan5-Dec-05 6:30
Gulfraz Khan5-Dec-05 6:30 
AnswerRe: Is it possible to remove existing graphics from an image? Pin
mav.northwind5-Dec-05 7:12
mav.northwind5-Dec-05 7:12 
AnswerRe: Is it possible to remove existing graphics from an image? Pin
Robert Rohde5-Dec-05 7:13
Robert Rohde5-Dec-05 7:13 
AnswerRe: Is it possible to remove existing graphics from an image? Pin
dnewmon5-Dec-05 7:22
dnewmon5-Dec-05 7:22 
GeneralRe: Is it possible to remove existing graphics from an image? Pin
Gulfraz Khan7-Dec-05 2:28
Gulfraz Khan7-Dec-05 2:28 
QuestionDateTime Range Pin
lior654#hotmail.com5-Dec-05 4:36
lior654#hotmail.com5-Dec-05 4:36 
AnswerRe: DateTime Range Pin
dnewmon5-Dec-05 6:58
dnewmon5-Dec-05 6:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.