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.