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

Textbox width change automatically

$
0
0

Hi again,

as Hiran wrote - use the TextWrapping-property to achieve that. In addition, set the MaxWidth-property accordingly. IOW:

<Window x: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"><Grid Background="AntiqueWhite"><TextBox Text="Something to start with" Margin="10" MaxWidth="400" TextWrapping="Wrap"/></Grid></Window>


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>