Hi Stephen, You shouldn't have to set the MaxWidth manually. Setting TextWrapping="Wrap" on your text box is all you should need to do.
To your specific issue about ActualWidth not being up to date you would need to call Comment.UpdateLayout() after you invalidate the visual. cheers, Patrick On Thu, Sep 22, 2011 at 12:28 PM, Stephen Price <[email protected]>wrote: > Hey all, > > I've got a TextBox in a DockPanel, basically takingup the remainder of the > Dock, being the right most field. I want the textbox to take up the > remainder of the panel (which it does nicely) and I also want it to wrap, > which it does. > The thing I'm having troubles with, is when I resize the dockpanel (the > whole thing is in a grid with a splitter, its in the left side with another > grid on the right). When I resize the DockPanel via the GridSplitter I need > to be able to alter the Width, or the MaxWidth so that it continues to wrap > as intended. > > I tried setting the MaxWidth to positive infinity and then back to the > ActualWidth but think its happening too quick so the ActualWidth hasnt been > recalculated yet. > > > Comment.MaxWidth = double.PositiveInfinity; > Comment.InvalidateVisual(); > Comment.MaxWidth = Comment.ActualWidth; > > > Anyone got an idea on how I can make the Wrap work correctly inside the > DockPanel for the Last child item? > > thanks, > > Stephen > > p.s. I think we should merge the OzSilverlight and OzWpf lists into a single > OzXaml list. > > > _______________________________________________ > ozwpf mailing list > [email protected] > http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf > >
_______________________________________________ ozwpf mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf
