私はカスタムコントロールを内部に持っています。私はテキストボックスを折りたたんだり展開したりしたいと思っています。縦に伸ばせば水平にしたい。Silverlight、テキストボックスを回転させるとすべてのテキストが表示されない
問題は、テキストボックスにテキストがすべて表示されない場合、回答を探していて、Silverlightのレイアウトの更新方法と関係があることです。ここに私のコードは
private void CollapseControl()
{
CollapseCommand.Content = "E";
CollapseCommand.Margin = _btnMarginOnCollapse;
BtnZoomIn.Visibility = Visibility.Collapsed;
BtnZoomOut.Visibility = Visibility.Collapsed;
ScrollViewerStackPanel.Visibility = Visibility.Collapsed;
ZoomPanel.Visibility = Visibility.Collapsed;
this.HorizontalAlignment = HorizontalAlignment.Left;
this.Width = 40;
RotateTransform nameRotateTransform = new RotateTransform();
nameRotateTransform.Angle = 270;
Nametb.RenderTransform = nameRotateTransform;
Nametb.VerticalAlignment = VerticalAlignment.Bottom;
Nametb.Height = Nametb.Width;
Nametb.Width = Nametb.Height;
Nametb.UpdateLayout();
}
ありがとう、それは私を助けました –