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

The Archive Base Latest Questions

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

I am working on creating a tag cloud in Silverlight 2 and trying to

  • 0

I am working on creating a tag cloud in Silverlight 2 and trying to bind data from a List collection to a Scale transform on a TextBlock. When running this I get an AG_E_PARSER_BAD_PROPERTY_VALUE error. Is it possible to data bind values to transforms in Silverlight 2? If not could I do something to the effect of FontSize={Binding Weight*18} to multiply the tag’s weight by a base font size? I know this won’t work, but what is the best way to calculate property values for items in a DataTemplate?

<DataTemplate> <TextBlock HorizontalAlignment='Stretch' VerticalAlignment='Stretch' TextWrapping='Wrap' d:IsStaticText='False' Text='{Binding Path=Text}' Foreground='#FF1151A8' FontSize='18' UseLayoutRounding='False' Margin='4,4,4,4' RenderTransformOrigin='0.5,0.5'> <TextBlock.RenderTransform>     <TransformGroup>         <ScaleTransform ScaleX='{Binding Path=WeightPlusOne}' ScaleY='{Binding Path=WeightPlusOne}'/>     </TransformGroup> </TextBlock.RenderTransform> 

  • 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. 2026-05-10T21:43:56+00:00Added an answer on May 10, 2026 at 9:43 pm

    The issue seems to be Rule #1 from this post:

    The target of data binding must be a FrameworkElement.

    So since ScaleTransform isn’t a FrameworkElement it doesn’t support binding. I tried to bind to a SolidColorBrush to test this out and got the same error as with the ScaleTransform.

    So in order to get around this you can create a control that exposes a dependency property of your tag data type. Then have a property changed event that binds the properties of your tag data to the properties in the control (one of which would be the scale transform). Here is the code I used to test this out.

    items control:

    <ItemsControl x:Name='items'>   <ItemsControl.ItemTemplate>     <DataTemplate>        <local:TagControl TagData='{Binding}' />     </DataTemplate>   </ItemsControl.ItemTemplate> </ItemsControl> 

    tag control xaml:

    <UserControl x:Class='SilverlightTesting.TagControl'     xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'      xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'      >     <TextBlock x:Name='text' TextWrapping='Wrap' FontSize='18' Margin='4,4,4,4'>       <TextBlock.RenderTransform>           <ScaleTransform x:Name='scaleTx' />       </TextBlock.RenderTransform>     </TextBlock> </UserControl> 

    tag control code:

    public partial class TagControl : UserControl {     public TagControl()     {         InitializeComponent();     }      public Tag TagData     {         get { return (Tag)GetValue(TagDataProperty); }         set { SetValue(TagDataProperty, value); }     }      // Using a DependencyProperty as the backing store for TagData.  This enables animation, styling, binding, etc...     public static readonly DependencyProperty TagDataProperty =         DependencyProperty.Register('TagData', typeof(Tag), typeof(TagControl), new PropertyMetadata(new PropertyChangedCallback(TagControl.OnTagDataPropertyChanged)));      public static void OnTagDataPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)     {         var tc = obj as TagControl;         if (tc != null) tc.UpdateTagData();     }      public void UpdateTagData()     {         text.Text = TagData.Title;         scaleTx.ScaleX = scaleTx.ScaleY = TagData.Weight;         this.InvalidateMeasure();     }  } 

    Seems like overkill for just setting a single property, but I couldn’t find an easier way.

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

Sidebar

Ask A Question

Stats

  • Questions 78k
  • Answers 78k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Try setting wreq.Method = 'Head'; after the 'KeepAlive' line. If… May 11, 2026 at 3:55 pm
  • added an answer It is possible for an iFrame to source content from… May 11, 2026 at 3:55 pm
  • added an answer The easiest solution would be to use a final temporary… May 11, 2026 at 3:55 pm

Related Questions

I am working on creating a .asmx webservice to meet the specific needs of
I am working on creating a daemon in Ruby using the daemons gem. I
I am working on creating a website in Django which consists of two parts:
I have an SQL database with multiple tables, and I am working on creating

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.