| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Windows Presentation Foundation (WPF) & XAML forum Ask questions related specifically to WPF. Also ask questions related to XAML. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
MultiBinding Problem
I have Rectangle that I want to flip in the X axis, I'm using ScaleTransform.
The problem is that i want to use converter for the multi binding, but when i use multi binding the Rectangle doesn't flip. If i use single binding it works. In the XAML just replay between the binding and the multi binding to see the result. <Grid > <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <DockPanel > <StackPanel Orientation="Horizontal" DockPanel.Dock="Left"> <TextBlock Text="FlipX"/> <TextBox x:Name="FlipX" Text="1" Margin="0,0,5,0"/> </StackPanel> </DockPanel> <Grid Grid.Row="1"> <Grid> <Grid Width="100" Height="100" RenderTransformOrigin="0.5, 0.5"> <Grid.RenderTransform> <TransformGroup> <ScaleTransform> <ScaleTransform.ScaleX> <Binding ElementName="FlipX" Path="Text"/> <!--<MultiBinding Converter="{StaticResource eibiConverter}"> <Binding ElementName="FlipX" Path="Text"/> </MultiBinding>--> </ScaleTransform.ScaleX> </ScaleTransform> </TransformGroup> </Grid.RenderTransform> <Rectangle x:Name="MyRect" Fill="LightBlue" > </Rectangle> <TextBlock Text="(0,0)" VerticalAlignment="Top" HorizontalAlignment="Left"/> </Grid> </Grid> <Border Width="100" Height="100" BorderBrush="Black" BorderThickness="2"/> </Grid> </Grid> The converter for the multi binding is: public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return -1; } |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|