c# - how to make pre-set public property to private while creating a custom control -


I'm just creating a custom MascadeTextbox for the date. Now I want to hide the mask property of the masked textbox from my users.

Edit:

  Public Class Custom Dat Mask: System. Windows .form. Maskedtextbox {public new string mask {get; Private set; } Public Custom Date Mask () {this.mask = @ "00/00/2 \ 000"; // This property should no longer be set by anybody. ValidatingType = typeof (System.DateTime); // This property should no longer be set by anybody}}  

I should do so that no one can set this property

Copy and paste it into your square:

  [Browsable (false), editorBrobable (editor BraziliteState. No]] Public new string mask {back {return base.Mask; } Set {base.Mask = value; }}  

[Browsable] Attribute property hides the property in the window. [EditorBrowsable] The feature hides from IntelliSense.


Comments

Popular posts from this blog

.net - C# List<T>.Find(x=>x.Rectangle.Contains(Point)) FAIL -

iphone - Smoothing a rounded stroke in Core Graphics -

c++ - QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment -