Click here to Skip to main content
15,904,822 members
Home / Discussions / C#
   

C#

 
QuestionTarga files displayed in openFileDialog Pin
MikeBr13-Apr-20 22:26
MikeBr13-Apr-20 22:26 
AnswerRe: Targa files displayed in openFileDialog Pin
OriginalGriff13-Apr-20 23:19
mveOriginalGriff13-Apr-20 23:19 
AnswerRe: Targa files displayed in openFileDialog Pin
Richard Deeming14-Apr-20 0:15
mveRichard Deeming14-Apr-20 0:15 
AnswerRe: Targa files displayed in openFileDialog Pin
Dave Kreskowiak14-Apr-20 4:37
mveDave Kreskowiak14-Apr-20 4:37 
QuestionProgramming Tcp with C# Pin
Member 1478193513-Apr-20 21:13
Member 1478193513-Apr-20 21:13 
AnswerRe: Programming Tcp with C# Pin
OriginalGriff13-Apr-20 21:25
mveOriginalGriff13-Apr-20 21:25 
GeneralRe: Programming Tcp with C# Pin
Member 1478193519-Apr-20 3:24
Member 1478193519-Apr-20 3:24 
QuestionSaving usercontrol design-time properties Pin
Crazy Joe Devola13-Apr-20 14:49
Crazy Joe Devola13-Apr-20 14:49 
I swear I have been searching for an answer for hours but could not find any understandable example or article Frown | :-( How do I make a property of a Winform usercontrol retain it's design time value? I added a new UserControl object. I put a label on the control. Added a property called "KeyText". I saw in few articles the attribute "DesignerSerailizationVisibility" mentioned so I added it as well.
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public string KeyText
{
    get { return label1.Text; }
    set
    {
        label1.Text = value;
    }
}
In the control, the default value of label1.Text is "X".

Then I added the control to a form. The property "KeyText" showed as one of the properties of the control. Great. So I changed it to "A". The design-time form showed A". Great. I compiled and ran the program - the control on the form showed "X" instead of "A".

What do I need to change to make the property persisteable? In VB6 I use something called PropBag to save and read design time properties.
AnswerRe: Saving usercontrol design-time properties Pin
OriginalGriff13-Apr-20 20:00
mveOriginalGriff13-Apr-20 20:00 
AnswerRe: Saving usercontrol design-time properties Pin
Richard Deeming14-Apr-20 0:13
mveRichard Deeming14-Apr-20 0:13 
GeneralRe: Saving usercontrol design-time properties Pin
Crazy Joe Devola14-Apr-20 13:45
Crazy Joe Devola14-Apr-20 13:45 
QuestionPrint Multiple Page in c# Pin
Mohamed Fahad13-Apr-20 9:08
Mohamed Fahad13-Apr-20 9:08 
AnswerRe: Print Multiple Page in c# Pin
Pete O'Hanlon13-Apr-20 9:30
mvePete O'Hanlon13-Apr-20 9:30 
QuestionMulti threading in c# Pin
User-862169513-Apr-20 1:49
User-862169513-Apr-20 1:49 
AnswerRe: Multi threading in c# Pin
OriginalGriff13-Apr-20 3:00
mveOriginalGriff13-Apr-20 3:00 
QuestionOPC Client Using C# Titanium Library Pin
Member 147907399-Apr-20 20:17
Member 147907399-Apr-20 20:17 
AnswerRe: OPC Client Using C# Titanium Library Pin
Gerry Schmitz10-Apr-20 6:46
mveGerry Schmitz10-Apr-20 6:46 
GeneralRe: OPC Client Using C# Titanium Library Pin
Member 1479073910-Apr-20 7:03
Member 1479073910-Apr-20 7:03 
GeneralRe: OPC Client Using C# Titanium Library Pin
Mycroft Holmes10-Apr-20 12:35
professionalMycroft Holmes10-Apr-20 12:35 
AnswerRe: OPC Client Using C# Titanium Library Pin
Pete O'Hanlon14-Apr-20 5:42
mvePete O'Hanlon14-Apr-20 5:42 
Questiontextbox update Pin
_Q12_9-Apr-20 19:19
_Q12_9-Apr-20 19:19 
AnswerRe: textbox update Pin
_Q12_9-Apr-20 21:20
_Q12_9-Apr-20 21:20 
AnswerRe: textbox update Pin
Gerry Schmitz10-Apr-20 6:43
mveGerry Schmitz10-Apr-20 6:43 
AnswerRe: textbox update Pin
BillWoodruff16-Apr-20 18:06
professionalBillWoodruff16-Apr-20 18:06 
QuestionUpate Exe Build Number Pin
Kevin Marois9-Apr-20 14:05
professionalKevin Marois9-Apr-20 14:05 

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.