How to make child elements move in WPF

Source: Internet
Author: User

Before contacting blend, oneself whole out a multitouchhelper, this thing is to do? is to use additional attributes to allow the element to be multi-touch.

Then one day found blend inside there is a behavior thing, I go, originally there is a ready-made one called translatezoomroatebehavior!

First reaction, the waste of this code farmers two days time!

The second reaction, the original code of agricultural thinking has reached this realm (can write something like the Great God), believe that not long, this code farmers can be promoted, when the general manager, as CEO, married Bai Fumi, embark on the peak of life, think still a little excited about it, hey ~ ~

The third reaction, translatezoomroatebehavior the name of the old, and have to add 2 DLLs, the use of this method:

Xmlns:i= "Http://schemas.microsoft.com/expression/2010/interactivity"
Xmlns:ei= "Http://schemas.microsoft.com/expression/2010/interactions"

<xxxUIElement>  
<i:interaction. behaviors>  
    <ei:translatezoomrotatebehavior/>  
</i:interaction. Behaviors>  
</xxxUIElement>

Then look at the short (Chang) Small (CU) ~-Lean Multitouchhelper of this code farmer, using the method:

<grid mt:multitouchhelper.iscontenter= "True" >  
  <xxxuielement mt:multitouchhelper.maxscale= "4"          
                MT : multitouchhelper.minscale= "0.5"
                mt:multitouchhelper.manipulationmode= "All"
                MT: Multitouchhelper.waitingforrecover= "/>"  
</Grid>

Mt:MultiTouchHelper.IsContenter: Set the touch of the container mt:MultiTouchHelper.MaxScale: maximum magnification
Mt:MultiTouchHelper.MinScale: Minimum multiple of reduction
Mt:MultiTouchHelper.ManipulationMode: Touch mode mt:MultiTouchHelper.WaitingForRecover: Wait time to restore the initial state

Comprehensive use, the details of the TZRB less than mth, such as MTH support the touch of the elements at the top, but the efficiency of mth seems less than TZRB?
Multitouchhelper will write an article later, enter the topic that I want to say today (is the prelude a bit long?) Is it like some kind of art that people can't help jumping ~ ~)

Requirements: Let the elements in the listbox move from left to right in turn.

Project carried out:

1, create a custom control, put a ListBox, traverse the child elements of the ListBox, add animation for it, done.
Ah Ah ~ project is really smooth, and indeed moved up, the task is completed, I believe it will not be long before I can go to the peak of life, think of a little excited about it ~ ~

Customer: Your frame is too ugly, change it.

Well, change will change. Find the custom control = "listbox=" ItemTemplate, ho Ho-ho ho! Changed well, I believe it will not be long before you can marry Bai Fumi, think of a little excited about it ~ ~

Customer: You do a good job, xxx page also to one.

OK, copy and paste, which is not! Oh, ah, it is a little excited about it ~ ~

Alas, the data entity is different, the child element style is different. One more custom control? Well, that's a good idea! It's a little exciting to think about.

Wait a minute...... This is not the way to go ah, this also come to a that also come one, when the promotion of a pay rise???

Hey, think of a little worry mulberry ...

At this point, Canvasitembehavior turned out to save the people, for the benefit of mankind ... Cough, please see:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.