Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - cannot set a TemplateBinding to my TranslateTransform

 
 
Old 07-14-2006   #1 (permalink)
Thomas Mueller


 
 

cannot set a TemplateBinding to my TranslateTransform

Hi,

i have a custom usercontrol. in the custom user control, i have defined two
dependency properties.

For example:

// Set the Value for the TransformTranslation X
public double TraX
{
get { return (double)GetValue(TraXProperty); }
set { SetValue(TraXProperty, value); }
}

// Using a DependencyProperty as the backing store for TraX. This
enables animation, styling, binding, etc...
public static readonly DependencyProperty TraXProperty =
DependencyProperty.Register("TraX", typeof(double),
typeof(ZisCircleToggleButtonControl), new UIPropertyMetadata(8.0));


//// Set the Value for the TransformTranslation Y
public double TraY
{
get { return (double)GetValue(TraYProperty); }
set { SetValue(TraYProperty, value); }
}

// Using a DependencyProperty as the backing store for TraY. This
enables animation, styling, binding, etc...
public static readonly DependencyProperty TraYProperty =
DependencyProperty.Register("TraY", typeof(double),
typeof(ZisCircleToggleButtonControl), new UIPropertyMetadata(8.0));

OK, for my custom control i have defined a style. inside the style i will
set the TranslateTransform for my control. For example:

<Setter Property="RenderTransform">
<Setter.Value>
<TranslateTransform X="{TemplateBinding TraX}" Y="{TemplateBinding
TraY}"/>
</Setter.Value>
</Setter>

when i compile this, i become the error message: Error 28 'TraX' member is
not valid because it does not have a qualifying type name.

whats the problem? i can bind the width to a custom dependency propertie or
what i want.

can someone help me?

thanks


My System SpecsSystem Spec
 

Thread Tools



Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46