Use Windows Phone fluidmovebehavior

Source: Internet
Author: User

You can useFluidmovebehaviorBehavior to dynamically display the change of element position. However, if you useFluidmovebehaviorYou can only dynamically display the transition from a specific position to a new position. By addingFluidmovebehaviorAndFluidmovesettagbehaviorIn combination, you can dynamically display the transition from the specified start point, even if the initial position isProgramSpecified by the reference of the data displayed in.

SetFluidmovebehaviorAndFluidmovesettagbehaviorWhen used in combination, a hidden data storage is created to help you access the required data, even if the data exists in different ranges. Although the data storage is hidden outside the viewFluidmovebehaviorAndFluidmovesettagbehaviorTo understand how data storage works.

Detailed parameter descriptions for these two methods are here: http://msdn.microsoft.com/zh-cn/library/ff723946 (V = expression.40). aspx

1. Open blend. Create a sample data source. For simplicity, only one image attribute is included. Change the attribute type to image, and the attribute name is also: image.

 

2. Select the collection node and drag it to layoutroot. In this way, a ListBox is automatically generated, and the left alignment of The ListBox is recorded.

3. Create a new grid and put an image in it. Fill the entire imageGrid . Note Image You do not need to specify the image source currently. . 4. Click the newly created gird and find Datacontext Properties, click the rightmost, select databinding... 5 in the pop-up menu, then open the element property tab in the pop-up menu, select ListBox, and select Selecteditem Click OK. Source Properties, click on the rightmost, right-click the pop-up menu, select databinding... 7. In the pop-up window, select the datacontext tab, here you can see Article Select the sample data source he created at the beginning Image Click OK. 8. Next, add Fluidmovebehavior . Set the 9appliesto attribute to self. 10. Set the initaltag attribute to datacontext. 11. if you have done the same in the first few parts, you should get the following effect 12. next, right-click ListBox and select edit additional template> edit generated items> edit current from the pop-up menu to go to the template editing page. 13. Add an action named "fluidmovesettagbehavior" to the image element. Note: Fluidmovesettagbehavior Instead Fluidmovebehavior 14. Set the tag attribute of fluidmovesettagbehavior in the right attribute panel to the running effect of datacontext.

Related Article

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.