Blog Archive

Thursday, August 7, 2014

Notes on Expression Blend

1. Gradient can used on Background and Opacity Mask. the latter could be on an Image

2. Control States are model by Visual State Group (Common, Focused) and a grid can have Opacity set for two group if not conflict
    These states are visible only Edit Template --> Edit Copy for a control.

3. Two workspace under windows: Design and Animation. The 1st relates to animation by Assets-> Control  StoryBoard action and 
set event trigger  and StoryBoard1.

4. Animation workSpace can utilize Transform Property and specifically Layout Transform to do Rotation. It may need to first turn off 
recording for StoryBoard to set key frame at 0 sec, then recording on to drag to sec to rotate 360 and restore size back.

5. Any group of Path, Drawing, Image, Controls can be Object/Timeline -->select multiple--> right click->Control->make User Control.
Its code behind can define a public prop showing up in Properties Grid Misc when it is hosted in a MainWindow.xaml.

6. Shape Set Operation and arbitrary path generation: any two shape can object->Combine -->(Unit, Substract, Intersect), including 
TextBlock where text can be substracted.  Also can convert Shape to path by Object->Path-->Convert to path. 

7. Carry User Control around: User Control build in Control Library Project can be used in WPF project seen under Assets Tab. 
Need to add project references. This also works even for any project type but have to manually add/remove when UC changes. Also add existing
 item as UC but that is just a copy of Xaml and cs and new changes will not automatically moved.

8. Easing Function: must select a Key Frame for property visible, in Animation Workspace. KeySpline =Simple cubic,Hold-in=no interpolation,
 direct to the end. 

9. Layout Controls: Grid's ScrollbarVisibility Property checkbox are attached property ScrollViewer.* and
 does not work well. So directly set it on ScrollViewer if you can; DockPanel LastChildFill also attached
 property and override the last child dock.

10. Layout Controls has Canvas and Grid, Grid has two mode: Grid Model and Canvas mode. the latter mode is not Canvas but behave 
like one --- child control are absolutely positioned not responding to Grid resizing.

11. Layout controls Border is very different: it has Border Brush, Back Ground, Corner Radius. But it can only hold one child.
 To host more children need to Object->Group into --> Grid to add grid and drag on more child.

No comments: