CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > .NET Programming > Windows Presentation Foundation (WPF) & XAML forum
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Windows Presentation Foundation (WPF) & XAML forum Ask questions related specifically to WPF. Also ask questions related to XAML.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old November 5th, 2009, 08:13 AM
    eitangabay eitangabay is offline
    Junior Member
     
    Join Date: Jun 2009
    Posts: 2
    eitangabay is an unknown quantity at this point (<10)
    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;
    }
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > .NET Programming > Windows Presentation Foundation (WPF) & XAML forum


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 11:04 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009