arrow-left arrow-right brightness-2 chevron-left chevron-right circle-half-full dots-horizontal facebook-box facebook loader magnify menu-down RSS star Twitter twitter GitHub white-balance-sunny window-close
Magellan Behaviors
1 min read

Magellan Behaviors

This is an old post and doesn't necessarily reflect my current thinking on a topic, and some links or images may not work. The text is preserved here for posterity.

Back to: Magellan Home

The web typically uses hyperlinks and postbacks to navigate between pages. With Magellan, we can use either a command, C# code, or using an Expression Blend Behavior.

When you reference the Magellan assemblies, the NavigateBehavior will appear in the Assets tab in Blend 3. You can drag and position it onto any UI element:

Navigate behavior

You can use the properties of the behavior to specify the values. The navigation behavior also allows parameters to be passed to the action, using the Parameters collection button.

In XAML, the behavior will appear as shown below:

<Button Content="Calculate">
        <NavigateBehavior Controller="Home" Action="Add">
                <Parameter ParameterName="left" Value="{Binding Path=Left}" />
                <Parameter ParameterName="right" Value="{Binding Path=Right}" />

The parameters passed to the behavior should match the method arguments on the controller action - see the controller section for details. Note that the parameters support data binding - this allows you to pass properties from the model or other UI elements automatically.

See also:

Back to: Magellan Home

Paul Stovell's Blog

Hello, I'm Paul Stovell

I'm a Brisbane-based software developer, and founder of Octopus Deploy, a DevOps automation software company. This is my personal blog where I write about my journey with Octopus and software development.

I write new blog posts about once a month. Subscribe and I'll send you an email when I publish something new.