Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Animate field

Animate field

Scheduled Pinned Locked Moved WCF and WF
questionwpf
7 Posts 2 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    elektrowolf
    wrote on last edited by
    #1

    How can I animate a field which is not defined in XAML but in normal code with a Storyboard?? Simply specifying the field's name does not work..

    L 1 Reply Last reply
    0
    • E elektrowolf

      How can I animate a field which is not defined in XAML but in normal code with a Storyboard?? Simply specifying the field's name does not work..

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      elektrowolf wrote:

      animate a field

      What is a field?

      Cheers, Karl » CodeProject 2008 MVP » Microsoft MVP - Client App Dev My Blog | Mole's Home Page | MVP Profile

      Just a grain of sand on the worlds beaches.

      E 1 Reply Last reply
      0
      • L Lost User

        elektrowolf wrote:

        animate a field

        What is a field?

        Cheers, Karl » CodeProject 2008 MVP » Microsoft MVP - Client App Dev My Blog | Mole's Home Page | MVP Profile

        Just a grain of sand on the worlds beaches.

        E Offline
        E Offline
        elektrowolf
        wrote on last edited by
        #3

        Karl Shifflett wrote:

        What is a field?

        A variable in a class.

        L 1 Reply Last reply
        0
        • E elektrowolf

          Karl Shifflett wrote:

          What is a field?

          A variable in a class.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          How is this field represented in your UI? What are you trying to animate? What do you want the UI to do?

          Cheers, Karl » CodeProject 2008 MVP » Microsoft MVP - Client App Dev My Blog | Mole's Home Page | MVP Profile

          Just a grain of sand on the worlds beaches.

          E 1 Reply Last reply
          0
          • L Lost User

            How is this field represented in your UI? What are you trying to animate? What do you want the UI to do?

            Cheers, Karl » CodeProject 2008 MVP » Microsoft MVP - Client App Dev My Blog | Mole's Home Page | MVP Profile

            Just a grain of sand on the worlds beaches.

            E Offline
            E Offline
            elektrowolf
            wrote on last edited by
            #5

            I create some balls in a Viewport3D during runtime and want them to slowly grow when they are hovered by the mouse. So I define the ScaleTransform3D as a class variable and add it to the balls transformation group in the MouseEnter event and remove it again in the MouseLeave event. In these event handlers I also want to raise the growing animation. So the ball is not available in XAML, but the transformation should be. The only problem is, how to access it??

            L 1 Reply Last reply
            0
            • E elektrowolf

              I create some balls in a Viewport3D during runtime and want them to slowly grow when they are hovered by the mouse. So I define the ScaleTransform3D as a class variable and add it to the balls transformation group in the MouseEnter event and remove it again in the MouseLeave event. In these event handlers I also want to raise the growing animation. So the ball is not available in XAML, but the transformation should be. The only problem is, how to access it??

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              In the below code, I'm access a Property on the UserControl called ProductLines from within XAML. You use RelativeSource={RelativeSource FindAncestor to find the control up the visual tree and then can access it properties.

              <ComboBox x:Name="cboProductLineComboBoxEditor"
              ItemsSource="{Binding Path=ProductLines, RelativeSource={RelativeSource FindAncestor,
              AncestorType={x:Type local:SalesPersonMaintenanceEditingxamDataGrid}}}"
              IsEditable="False" SelectedValuePath="ProductLineIdent"
              SelectedValue="{Binding RelativeSource={RelativeSource TemplatedParent},
              Path=ProductLineId, Mode=TwoWay}" IsSynchronizedWithCurrentItem="True"/>

              Cheers, Karl » CodeProject 2008 MVP » Microsoft MVP - Client App Dev My Blog | Mole's Home Page | MVP Profile

              Just a grain of sand on the worlds beaches.

              E 1 Reply Last reply
              0
              • L Lost User

                In the below code, I'm access a Property on the UserControl called ProductLines from within XAML. You use RelativeSource={RelativeSource FindAncestor to find the control up the visual tree and then can access it properties.

                <ComboBox x:Name="cboProductLineComboBoxEditor"
                ItemsSource="{Binding Path=ProductLines, RelativeSource={RelativeSource FindAncestor,
                AncestorType={x:Type local:SalesPersonMaintenanceEditingxamDataGrid}}}"
                IsEditable="False" SelectedValuePath="ProductLineIdent"
                SelectedValue="{Binding RelativeSource={RelativeSource TemplatedParent},
                Path=ProductLineId, Mode=TwoWay}" IsSynchronizedWithCurrentItem="True"/>

                Cheers, Karl » CodeProject 2008 MVP » Microsoft MVP - Client App Dev My Blog | Mole's Home Page | MVP Profile

                Just a grain of sand on the worlds beaches.

                E Offline
                E Offline
                elektrowolf
                wrote on last edited by
                #7

                Actually, I have to specify the target's name :(

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups