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

  • SEARCH
  • Home
  • 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 6344011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:33:21+00:00 2026-05-24T20:33:21+00:00

A failed XAML attempt here – I’m obviously doing something stupid with the Style

  • 0

A failed XAML attempt here – I’m obviously doing something stupid with the Style/Setter syntax. I just want to flip an element based on some bindings by setting the ScaleX and ScaleY properties of a ScaleTransform from a DataTrigger. Setter.Property obviously doesn’t support a property path, but how can I get round this? I can’t set the whole RenderTransform property because ScaleX and ScaleY are independent. Any ideas?

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
   <StackPanel>
      <TextBlock FontSize="50" RenderTransformOrigin=".5,.5">
         <TextBlock.Style>
            <Style>
               <Style.Triggers>
                  <DataTrigger Binding="{Binding IsChecked, ElementName=FlipX}" Value="True">
                     <Setter Property="RenderTransform.ScaleX" Value="-1"/>
                  </DataTrigger>
                  <DataTrigger Binding="{Binding IsChecked, ElementName=FlipY}" Value="True">
                     <Setter Property="RenderTransform.ScaleY" Value="-1"/>
                  </DataTrigger>
               </Style.Triggers>
            </Style>
         </TextBlock.Style>
         <TextBlock.RenderTransform>
          <ScaleTransform/>
         </TextBlock.RenderTransform>
      Hello World
      </TextBlock>
      <CheckBox Name="FlipX">Flip x</CheckBox>
      <CheckBox Name="FlipY">Flip y</CheckBox>
   </StackPanel>
</Page>
  • 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-24T20:33:22+00:00Added an answer on May 24, 2026 at 8:33 pm

    Setters work on elements, and Transform doesn’t derive from UIElement, so I don’t think you’re going to be able to do this using a style.

    I’d fix this in the view model: implement boolean FlipX and FlipY properties, and expose ScaleX and ScaleY properties that the ScaleTransform can bind to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just enabled Failed Request Tracing for a site and I get a URL_CHANGED
gem install heroku failed with following message and I have tried the solution here
Why won't this work? In generic.xaml for a custom control: In the style applied
I failed with the mysqldump method earlier. Now I'm trying to just call the
Package Load Failure Package 'Microsoft.VisualStudio.Xaml' has failed tot load properly. . . yadda, yadda,
I have some string representations of Xaml objects, and I want to build the
I just started learning Silverlight and I failed to use a transparent background for
Any failed ASSERT statements on Windows cause the below debug message to appear and
Exception: Failed to compare two elements in the array. private void assignNames(DropDownList ddl, Hashtable
I failed to find a way to disable the browser detection feature added by

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.