Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6822897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:43:05+00:00 2026-05-26T21:43:05+00:00

I have a custom control an inside of it I have a textbox that

  • 0

I have a custom control an inside of it I have a textbox that rotates depending wether you’d like it to collapse or expand, when it is collapsed I want the textbox to be vertical and when it is expanded I want it horizontal.

The problem is that when it is vertical the textbox doesn’t show all the text, I’ve being looking for an answer, and I understand it has to do with the way silverlight updates it’s layout. Here is my code

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();

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:43:05+00:00Added an answer on May 26, 2026 at 9:43 pm

    One solution would be to use the LayoutTransformer control from the Silverlight toolkit.

    You wrap the existing textblock inside a LayoutTransformer

            <toolkit:LayoutTransformer x:Name="Namelt" ...>
                <toolkit:LayoutTransformer.LayoutTransform>
                    <RotateTransform />
                </toolkit:LayoutTransformer.LayoutTransform>
                <TextBlock x:Name="Nametb" Text="Hello World" />
            </toolkit:LayoutTransformer>
    

    Then your code looks like:-

    ((RotateTransform)Namelt.LayoutTransform).Angle = 270;                         
    Namelt.VerticalAlignment = VerticalAlignment.Bottom;     
    Namelt.Height = Nametb.Width;     
    Namelt.Width = Nametb.Height;  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Custom Control that has multiple textbox fields and a checkbox contained
I have custom control with asp textbox inside. And i need to Validate by
I have a custom control that I've placed inside a cell of a grid.
I have a Custom control derived from wxControl,inside a dialog with a vertical sizer
I have a custom control that own a property. Inside this custom control OnInit
I want to create custom WPF control that has a single child control inside.
I have a custom user control extending the Listbox class. Inside of it I
I have a custom control that inherits from UserControl , and I can't get
I have a custom control that needs a minor adjustment when running on XP
I have a custom control (C#, visual studio). I want to show a tooltip

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.