Thursday, December 6, 2007

Loop a timeline - repeat timeline

Need to know how to loop a timeline in expression blend? Here is how!

in the objects and timeline click the arrow next to the object you are animating. If there is something in the drop down with another arrow click it.. repeat! The ones that do not have arrows you will be able to right click them and set the repeat count to whatever you want. There is a little icon when you set the repeat count that will let you set it to infinite if needed.

Wednesday, November 28, 2007

How to center a control or object within a grid within the page

I have a grid with a control in it. I want the control ( or object ) to be centered in the grid when the window is expanded. This is how I did it:

The grid

Width is set to : Auto

Height to: 705.5 (yours will be different, it is whatever you want/need)

Row 1
Row Span 1
Column 0
ColumnSpan 2

Horizontal Alignment Center
Vertical Alignment Center

Margin
<--172.176
-->2.131
(up)10
(dwn)-22.5

My control :

Width 533
Height 600
Row 0
Row Span 1
Column 0
Column Span 1
Horizontal Alignment Stretch
Vertical Alignment Stretch

Margin
<--41.25
-->48.75
(up3.25
(dwn)102.25

Friday, October 26, 2007

timeline does not automatically play. Stop Timeline

Took me a long time to figure this one out!

When you create a new timeline, Blend creates by default an Event trigger which starts the animation when the scene is loaded.

Here is how you can delete it:-
open the Triggers palette- select the "Window.Loaded" event; (the bottom area of the palette will show all the actions for the "Window.Loaded" Event trigger)- click on the "-Trigger" button

In a similar way you can add an Event Trigger to start the animation when the button is clicked:- create the button- select the button- click on "+ Event"- select "button" in the first field (when button) and Click in the second field (in the end it will say: When button.Click is raised)- click on the "+" button- select Storyboard1.Begin as the action

You may also start the animation from code if you want: - add an Event in the property inspector OnButtonClick to the button - insert the following code (replace Storyboard1 with the name of your storyboard private void OnButtonClick(object sender, RoutedEventArgs e) { Storyboard storyboard = this.FindResource("Storyboard1") as Storyboard; storyboard.Begin(this); }

Thanks Adrian! You helped out a ton!

Thursday, October 18, 2007

Slider binded to text block with NO DECIMALS!

put this:

IsSnapToTickEnabled="True"

into your XAML for the slider

(right click the slider and click view XAML.. then put that into the part of XAML for the slider)

Works great.. no decimals or extra numbers!

Expression Blend

Monday, October 15, 2007

link

another great link for tutorials and tips:
http://www.blendtips.com/

Flash in blend

here is the only tutorial I have ran across so far that teaches how to put flash in blend (by making a flash player)

http://blogs.msdn.com/jijia/archive/2007/06/07/wpf-flash-activex.aspx

Its in another language but there is a ton of pictures and a tiny bit of english.. good luck!

Slider that changes text block value

1. Make a slider (in the asset library) and name it "mySlider"
2. Make a text block name it "myTextBlock"
3. Click the small square in common properties tab next to text field
4.In the context menu, click Data Binding.
5.The Create Data Binding dialog box appears. On the Element Property tab, choose the mySlider (in the Scene elements column).
6.In the column to the right, choose the property Value.
7.Click Finish. An orange border appears around the text box of the property that has been bound

Im working on figuring out how to make it not use decimals