System.windows.forms.textbox properties
The following code example adds a Button to a form and sets some of its common properties. The example anchors the button to the bottom-right corner of the form so it keeps its relative position as the form is resized.
Next it sets the BackgroundImage and resizes the button to the same size as the Image. The example then sets the TabStop to true and sets the TabIndex property.
Lastly, it adds an event handler to handle the Click event of the button. This example requires that you have an ImageList named imageList1. Use the Anchor property to define how a control is automatically resized as its parent control is resized. Anchoring a control to its parent control ensures that the anchored edges remain in the same position relative to the edges of the parent control when the parent control is resized.
The actual display character used will be the thousands placeholder appropriate to the format provider, as determined by the control's FormatProvider property. Time separator. The actual display character used will be the time symbol appropriate to the format provider, as determined by the control's FormatProvider property.
Date separator. The actual display character used will be the date symbol appropriate to the format provider, as determined by the control's FormatProvider property. Currency symbol. The actual character displayed will be the currency symbol appropriate to the format provider, as determined by the control's FormatProvider property. Escapes a mask character, turning it into a literal. All non-mask elements will appear as themselves within MaskedTextBox.
Literals always occupy a static position in the mask at run time, and cannot be moved or deleted by the user. A date day, numeric month, year in international date format. A date day, month abbreviation, and year in United States format in which the three-letter month abbreviation is displayed with an initial uppercase letter followed by two lowercase letters.
United States phone number, area code optional. If users do not want to enter the optional characters, they can either enter spaces or place the mouse pointer directly at the position in the mask represented by the first 0. A currency value in the range of 0 to The currency, thousandth, and decimal characters will be replaced at run time with their culture-specific equivalents. Please help me. Saturday, May 23, AM. Saturday, May 23, PM.
Please help me System. Hello Aldian, please show us the line of code. Text; The semicolon is not required in Visual Basic. Armin Not allowed However in my perception a simple typo the rest is correct.
Monkeyboy 0. Please help me You can solve it by not doing whatever you are doing which causes that error. Invoked when an unhandled StylusButtonDown attached event reaches an element in its route that is derived from this class. Invoked when an unhandled StylusButtonUp attached event reaches an element in its route that is derived from this class.
Invoked when an unhandled StylusDown attached event reaches an element in its route that is derived from this class. Invoked when an unhandled StylusEnter attached event is raised by this element. Invoked when an unhandled StylusInAirMove attached event reaches an element in its route that is derived from this class.
Invoked when an unhandled StylusInRange attached event reaches an element in its route that is derived from this class.
Invoked when an unhandled StylusLeave attached event is raised by this element. Invoked when an unhandled StylusMove attached event reaches an element in its route that is derived from this class. Invoked when an unhandled StylusOutOfRange attached event reaches an element in its route that is derived from this class. Invoked when an unhandled StylusSystemGesture attached event reaches an element in its route that is derived from this class.
Invoked when an unhandled StylusUp attached event reaches an element in its route that is derived from this class. Invoked whenever an unhandled TextInput attached routed event reaches an element derived from this class in its route. Invoked whenever an unhandled ToolTipClosing routed event reaches this class in its route. Invoked whenever the ToolTipOpening routed event reaches this class in its route. Provides class handling for the TouchDown routed event that occurs when a touch presses inside this element.
Provides class handling for the TouchEnter routed event that occurs when a touch moves from outside to inside the bounds of this element.
Provides class handling for the TouchLeave routed event that occurs when a touch moves from inside to outside the bounds of this UIElement. Provides class handling for the TouchMove routed event that occurs when a touch moves while inside this element. Provides class handling for the TouchUp routed event that occurs when a touch is released inside this element. Called when the VisualCollection of the visual object is modified. Invoked when the parent of this element in the visual tree is changed.
Supports incremental layout implementations in specialized subclasses of FrameworkElement. ParentLayoutInvalidated UIElement is invoked when a child element has invalidated a property that is marked in metadata as affecting the parent's measure or arrange passes during layout. Converts a Point in screen coordinates into a Point that represents the current coordinate system of the Visual. Converts a Point that represents the current coordinate system of the Visual into a Point in screen coordinates.
Determines the next element that would receive focus relative to this element for a provided focus movement direction, but does not actually move the focus. Raises a specific routed event. The RoutedEvent to be raised is identified within the RoutedEventArgs instance that is provided as the RoutedEvent property of that event data.
Undoes the most recent undo command. In other words, redoes the most recent undo unit on the undo stack. Provides an accessor that simplifies access to the NameScope registration method. Removes the provided object from this element's logical tree. FrameworkElement updates the affected logical tree parent pointers to keep in sync with this deletion.
Attaches a binding to this element, based on the provided source property name as a path qualification to the data source.
Searches for a resource with the specified name and sets up a resource reference to it for the specified property. Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.
Returns whether serialization processes should serialize the contents of the CommandBindings property on instances of this class. Returns whether serialization processes should serialize the contents of the InputBindings property on instances of this class. Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.
Returns whether serialization processes should serialize the contents of the Resources property. Returns whether serialization processes should serialize the contents of the Style property. Returns a value that indicates whether the effective value of the Text property should be serialized during serialization of the TextBox object.
Returns whether serialization processes should serialize the contents of the Triggers property. Returns the string representation of a Control object. Returns a transform that can be used to transform coordinates from the Visual to the specified Visual ancestor of the visual object. Returns a transform that can be used to transform coordinates from the Visual to the specified Visual3D ancestor of the visual object. Returns a transform that can be used to transform coordinates from the Visual to the specified visual object descendant.
Returns a transform that can be used to transform coordinates from the Visual to the specified visual object. Translates a point relative to this element to coordinates that are relative to the specified element.
In other words, undoes the most recent undo unit on the undo stack. Simplifies access to the NameScope de-registration method. Reapplies the default style to the current FrameworkElement. Enforces that the calling thread has access to this DispatcherObject. Occurs when the input system reports an underlying drag event with this element as the drag target. Occurs when the input system reports an underlying drag event with this element as the drag origin.
Occurs when the input system reports an underlying drag event with this element as the potential drop target. Occurs when the input system reports an underlying drop event with this element as the drop target.
Occurs when the value of the Focusable property changes. Occurs when the input system reports an underlying drag-and-drop event that involves this element. Occurs when this FrameworkElement is initialized. This event coincides with cases where the value of the IsInitialized property changes from false or undefined to true.
Occurs when the value of the IsEnabled property on this element changes. Occurs when the value of the IsHitTestVisible dependency property changes on this element. Occurs when the value of the IsKeyboardFocused property changes on this element. Occurs when the value of the IsKeyboardFocusWithin property changes on this element. Occurs when the value of the IsMouseCaptured property changes on this element.
Occurs when the value of the IsMouseDirectlyOver property changes on this element. Occurs when the value of the IsStylusCaptured property changes on this element. Occurs when the value of the IsStylusCaptureWithin property changes on this element. Occurs when the value of the IsStylusDirectlyOver property changes on this element.
Occurs when the value of the IsVisible property changes on this element. Occurs when the layout of the various visual elements associated with the current Dispatcher changes. Occurs when a manipulation and inertia on the UIElement object is complete. Occurs when the input device loses contact with the UIElement object during a manipulation and inertia begins. Occurs when an input device begins a manipulation on the UIElement object.
Occurs when there is a change in the keyboard or mouse button state during a drag-and-drop operation. Occurs when the stylus moves while over the element. The stylus must move while being detected by the digitizer to raise this event, otherwise, PreviewStylusInAirMove is raised instead. Occurs when the cursor is requested to display. This event is raised on an element each time that the mouse pointer moves to a new location, which means the cursor object might need to be changed based on its new position.
Occurs when BringIntoView Rect is called on this element. Occurs when either the ActualHeight or the ActualWidth properties change value on this element. Occurs when the stylus moves over this element. The stylus must move while on the digitizer to raise this event. Otherwise, StylusInAirMove is raised instead. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info.
Contents Exit focus mode. Text Box Class Reference Is this page helpful? Please rate your experience Yes No. Any additional feedback? Namespace: System. Controls Assembly: PresentationFramework. Represents a control that can be used to display or edit unformatted text. LocalizabilityAttribute ContentPropertyAttribute. Note Setting a visual property only has an effect if that property is both present in the control's default template and is set by using a TemplateBinding.
In this article. Inherited from TextBoxBase. Gets the rendered height of this element. Inherited from FrameworkElement. Gets the rendered width of this element. Inherited from UIElement. Gets a value that indicates whether at least one touch is captured to this element. Gets a value that indicates whether at least one touch is pressed over this element.
Gets or sets a brush that describes the background of a control. Inherited from Control. Gets or sets a brush that describes the border background of a control. Gets or sets the border thickness of a control. Gets a value that indicates whether the most recent undo action can be redone. Gets a value that indicates whether the most recent action can be undone.
Gets or sets the brush that is used to paint the caret of the text box. Gets or sets how characters are cased when they are manually entered into the text box. Gets or sets the cursor that displays when the mouse pointer is over this element.
Gets or sets the data context for an element when it participates in data binding. Inherited from DependencyObject. Gets the size that this element computed during the measure pass of the layout process. Inherited from DispatcherObject. Gets the vertical size of the visible content area. Gets the horizontal size of the visible content area. Gets or sets the font family of the control. Gets or sets the font size. Gets or sets the degree to which a font is condensed or expanded on the screen.
Gets or sets the font style. Gets or sets the weight or thickness of the specified font. Gets or sets a brush that describes the foreground color. Gets a value that indicates whether a control supports scrolling. Gets a value indicating whether this element has any animated properties. Gets or sets the suggested height of the element. Gets or sets the horizontal alignment of the control's content. Gets or sets the horizontal scroll position.
Gets or sets a value that indicates whether a horizontal scroll bar is shown. Gets the collection of input bindings associated with this element. Gets a value indicating whether this element has keyboard focus. Gets a value that indicates whether this element has been loaded for presentation. Gets a value indicating whether the current size returned by layout measure is valid. Gets or sets a value that indicates whether a read-only text box displays a caret. Gets a value that indicates whether this instance is currently sealed read-only.
Gets a value that indicates whether the text box has focus and selected text. Gets or sets a value that indicates whether a control is included in tab navigation. Gets or sets the outer margin of an element. Gets or sets the maximum height constraint of the element. Gets or sets the maximum number of characters that can be manually entered into the text box. Gets or sets the maximum width constraint of the element. Gets or sets the minimum height constraint of the element.
Gets or sets the minimum width constraint of the element. Gets or sets the padding inside a control. Gets the logical parent element of this element. Gets a value that uniquely identifies this element. Gets or sets the final render size of this element. Gets or sets the locally-defined resource dictionary. Gets or sets the brush that highlights selected text. Gets or sets a character index for the beginning of the current selection.
0コメント