![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| | 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 Specs![]() |