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 836967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:04:09+00:00 2026-05-15T05:04:09+00:00

I am using Silverlight 3.0 + .Net 3.5 + VSTS 2008 + C# to

  • 0

I am using Silverlight 3.0 + .Net 3.5 + VSTS 2008 + C# to develop silverlight application based on ASP.Net. I am very confused about what are the function of “TranslateTransform” and “RenderTransformOrigin” in the following code snippet?

BTW: I roughly understand RenderTransformOrigin means move an UI element in x-axis and y-axis by some offset, is that correct? Move the whole UI element?

        <Grid Margin="-1,0,100,0" x:Name="controlsContainer" Height="35" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Bottom">
            <Grid.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform Y="0"/>
                </TransformGroup>
            </Grid.RenderTransform>
            <Rectangle Margin="0,0,0,0" Height="35" VerticalAlignment="Top" Fill="#97000000" Stroke="#00000000" RenderTransformOrigin="0.5,0.5"/>
            <VideoPlayer:mediaControl Height="35" Margin="1,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Top" x:Name="mediaControls" Visibility="Visible"/>
        </Grid>
  • 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-15T05:04:10+00:00Added an answer on May 15, 2026 at 5:04 am

    Your understanding of RenderTransformOrigin is not quite correct.

    RenderTransformOrigin accepts a point that defines the origin or center point around which RenderTransforms such as RotateTransform is applied.

    The interesting thing with the point defined by RenderTransformOrigin is that it is not in absolute coordinates. What does that mean? Well lets say you have an element that is 100 x 100 pixels in size if you wanted to apply your transformations around the center point, for example rotate 45 degrees around the center, you would not use the absolute coordinates of 50, 50 but rather 0.5, 0.5 which basically says the origin of the element is 0.5 or half way across and 0.5 down.

    While typical values for the origin would be between 0 and 1, where 0 in the X axis is the left of the element and 1 the right, and 0 in the Y axis is the top of the element and 1 is the bottom of the element, you can also set the origin to a point outside the element. Like 1.5, 0.5 which would set the origin hlaf way down the element and half the element width outside to the right of the element.

    TranslateTransform, does a translation or a move of the element, if you translate an element 45,60 what this means is move the element 45 units to the right and 60 down.

    Here are a few examples you can play with, that might help make what I said clearer.

        <!-- Rectangle rotated around the left top corner -->
        <Rectangle Width="100" Height="100" Fill="Red" RenderTransformOrigin="0,0">
            <Rectangle.RenderTransform>
                <RotateTransform Angle="45" />
            </Rectangle.RenderTransform>
        </Rectangle>
    
        <!-- Rectangle rotated around the center point -->
        <Rectangle Width="100" Height="100" Fill="Blue" RenderTransformOrigin="0.5,0.5">
            <Rectangle.RenderTransform>
                <RotateTransform Angle="45" />
            </Rectangle.RenderTransform>
        </Rectangle>
    
        <!-- Rectangle rotated around the bottom right corner -->
        <Rectangle Width="100" Height="100" Fill="Yellow" RenderTransformOrigin="1,1">
            <Rectangle.RenderTransform>
                <RotateTransform Angle="45" />
            </Rectangle.RenderTransform>
        </Rectangle>
    
        <!-- Rectangle translated 50 units to the right 70 units up, the origin does not matter here-->
        <Rectangle Width="100" Height="100" Fill="Green" RenderTransformOrigin="0,0">
            <Rectangle.RenderTransform>
                <TranslateTransform X="50" Y="-70" />
            </Rectangle.RenderTransform>
        </Rectangle>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

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.