Quantcast
Channel: Textbox width change automatically
Viewing all articles
Browse latest Browse all 6

Textbox width change automatically

$
0
0

Hi there,

actually, what you describe is the default behavior of WPF controls. For instance:

<Windowx:Class="WpfTests.Window20"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"Title="Window20"SizeToContent="WidthAndHeight"><GridBackground="AntiqueWhite"><TextBoxText="Something to start with"Margin="10"/></Grid></Window>

 

If you change the Text in the above TextBox control, you'll see both the TextBox and the Window change their size. So you really only need to put your TextBox into i.e. a Grid and assure that the grid control allows to size the column in which the TextBox resides accordingly.


Cheers,
Olaf
http://blogs.intuidev.com

Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>