[Turn] "completely lifted!" true Expression Blend actual combat development skills "the eighth chapter Fluidmovebehavior fully resolves one of the floating moving

Source: Internet
Author: User

Haven't updated the blog for a long time, today if not urgent, ready to three rounds, fully explain the most cow blend elements-"fluidmovebehavior". I assure you that these three chapters must be very wonderful, not to see you certainly regret . I believe that after the publication of these three articles, many of the domestic Silverlight and WPF works will be filled with a variety of flying, floating cool effects, as well as the smooth movement of elements of the scroll bar. Your customers will be amazed that the software can be so flashy. And what's even more amazing is that it's really very, very simple to achieve these effects, and one line of code doesn't have to be written.

Many programmers don't know about blend, and of course fewer people know fluidmovebehavior. Fluidmovebehavior, like his name, attaches him to the flow of all elements, such as:

      

In the sixth Chapter we talked about using the Wrappanle construct the listbox, I made some minor changes to him, so that when he changed the size of the container, all the elements in the listbox would float to his position in a flowing way. The procedure is very simple, first right-click the listbox in the pop-up menu, select Edit Additional templates->edit Layout of Items->editcurrent, Enter Itemspaneltemplate edit mode.

        

Here we can see WrapPanel ( originally Stackpanle, but in the sixth chapter we changed it to WrapPanel). First select WrapPanel.

    

Then in the Assets panel, select behaviors->fluidmovebehavior. Double-click on it and he will automatically attach it to the WrapPanel we just selected.

    

If you do it right, you should get the effect in.

    

Then click Fluidmovebehavior and set the AppliesTo property to childrenin the Properties panel on the right.

    

Exits the current template editing mode. Congratulations, your first floating, moving listbox has been completed. It is important to note that you should check the listbox, do not specify a width for him, and set horizontalalignment= "Stretch" so that he will follow the size of the container changes. Click F5 to run, and then try to change the size of IE. You can see the effect.

SOURCE download

Reprint article Source: http://www.cnblogs.com/kaodigua/archive/2011/03/02/1968726.html

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.