I'm building a complex change password form, but I need a simple task to continue my work:
I need to know what text is selected in a PasswordBox.
I know how to do it in TextBox components, using SelectedText, but I can't in a PasswordBox.
Have you some solutions to this problem?
Thank you
Related
Hello everyone what I'm trying is in wpf to make that user cant type in textbox. I know there is way just to make it isEnabled = False but if i use it my textbox gets grey color and i cant make it without background! So is there anyway to forbid user entering any char in textbox or any other way? Please help
Use the TextBox.IsReadOnly property: http://msdn.microsoft.com/en-us/library/ms753374.aspx
Did you want to dynamically change when the textbox is editable or is it always going to be un-editable? You might consider using a label instead if this is the case. If its dynamic you probably want the backcolor to change to let the user know this is the case.
Hi I have one textbox and one passwordBox in my UI. Now I want to display "Enter User Name" in the textbox and want to display "Enter Password" in the passwordBox for very known reason. But I have seen that this option is missing in PasswordBox.
Right now my approach is to another textbox in the same position as the passwordBox and in gotFocus event flip the controls. But just want to know is there any other way I can do that?
By default passwordBox contains no string.
I need this feature fro windows phone apps, and the example all of you provided is fine but doesn't work with Windows phone as there is no . Anyhow thanks for the answers from all of you. But could you please provide solution keeping in mind Windows phone features
You can create a style for your passwordbox. Check below link
http://prabu-guru.blogspot.in/2010/06/how-to-add-watermark-text-to-textbox.html
Actually, It is not possible to show text Enter Password in PasswordBox. Usually to show users to enter Password it is shown as:
and you can set hover text with Enter Password.
You most definitely can by creating a new control template and set some triggers in it.
See this SO post
I'm trying to achieve a similar functionality as with RichTextBox while using the MemoEdit control.
With RichTextBox it's possible to use .Select() in order to select part of the text then use .SelectionBackColor() in order to change the backcolor only for the selected text while the rest of the text still has the same color. Sadly I wasn't able to achieve this since the MemoEdit control doesn't appear to have any similar methods for achieving this.
Anyone managed to get anything similar working using MemoEdit or has a good alternative (that allows the control to still be able to use the form skin) ?
Thanks in advance.
i am trying to create a wpf app and have different parts in user controls.
in the navigation i have some buttons (now using the ribbon ctp). is it possible to change the main user control when different buttons are pressed in xaml. or is this just a bad way to do things?
sorry, really new to xaml and im trying to get my head arround it.
Further to what Carlo has said,
The way we do it is to have a blank grid in the place you want your controls to all appear and then use BlankGrid.Children.Clear() and BlankGrid.Children.Add() to set up which control is visible in this position.
We found that was the nicest programatically as we have a large number of custom controls, but Carlo's method would work nicely if you wanted to use the designer.
I think this is a pretty regular procedure in WPF. In my experience, me and other programmers put the controls where we want to show them and make their visibility hidden, collapsed or visible depending on what we want to show the user.
does anyone know about a windows forms control that acts like the address bar of a browser?
it is just like a textbox, but to the right there is a dropdown menu that shows the history of previously entered text.
thanks a lot!
Look at properties "AutoCompleteCustomSource", "AutoCompleteMode" and "AutoCompletesource" on TextBox class.
You can use a ComboBox for this. Just add the previous entries to the item list. If what you actually want is AutoComplete, the WinForms TextBox control supports that natively.