Class StageScroller
Represents a control of horizontally aligned content elements (stages). Each stage has the possibility to scroll to the next or previous stage.
Inheritance
Implements
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
[TemplatePart(Name = "PART_FlipControl", Type = typeof(FlipControl))]
public class StageScroller : ContentControl, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild
Remarks
The StageScroller is an early beta implementation. It currently only works together with the MainWindow, a CompositionContainer and the IRegionManager. The stages are built automatically by importing all classes that implement IStageScrollerItem and are exported using the ModuleExportAttribute. All implementations of IStageScrollerItem must also implement IApplicationMenuItem.
Examples
This code examples illustrates how to implement a stage for the monitoring module and add the StageScroller control as content to the MainWindow.
<SAF:MainWindow x:Class="Sartorius.SAF.Documentation.Examples.Controls.StageScroller.StageScrollerExamples"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
xmlns:SAF="http://www.sartorius.com/SAF">
<SAF:MainWindow.ApplicationMenu>
<SAF:ApplicationMenu ItemsSource="{Binding Modules}" />
</SAF:MainWindow.ApplicationMenu>
<!-- MainWindow Content -->
<SAF:StageScroller />
</SAF:MainWindow>
Constructors
View SourceStageScroller()
Initializes a new instance of the StageScroller class.
Declaration
public StageScroller()
Fields
View SourceAnimationTimeProperty
DependencyProperty of AnimationTime
Declaration
public static readonly DependencyProperty AnimationTimeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
NavigateFromCommandProperty
The DependencyProperty of NavigateFromCommand
Declaration
public static readonly DependencyProperty NavigateFromCommandProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
NavigateToCommandProperty
The DependencyProperty of NavigateToCommand
Declaration
public static readonly DependencyProperty NavigateToCommandProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
SelectedIndexProperty
The DependencyProperty of SelectedIndex
Declaration
public static readonly DependencyProperty SelectedIndexProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
SideBrushProperty
The DependencyProperty of SideBrush
Declaration
public static readonly DependencyProperty SideBrushProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
SideContentWidthProperty
The DependencyProperty of SideContentWidth
Declaration
public static readonly DependencyProperty SideContentWidthProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Properties
View SourceAnimationTime
Gets or sets the time of the slide animation in milliseconds
Declaration
public int AnimationTime { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
NavigateFromCommand
Gets or sets the NavigateFromCommand
Declaration
public ICommand NavigateFromCommand { get; set; }
Property Value
| Type | Description |
|---|---|
| ICommand |
NavigateToCommand
Gets or sets the NavigateToCommand
Declaration
public ICommand NavigateToCommand { get; set; }
Property Value
| Type | Description |
|---|---|
| ICommand |
SelectedIndex
Gets or sets the SelectedIndex
Declaration
public int SelectedIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
SideBrush
Gets or sets the Brush of the Side Area
Declaration
public Brush SideBrush { get; set; }
Property Value
| Type | Description |
|---|---|
| Brush |
SideContentWidth
Gets or sets the SideContentWidth
Declaration
public double SideContentWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
View SourceOnApplyTemplate()
Is invoked whenever application code or internal processes call ApplyTemplate().
Declaration
public override void OnApplyTemplate()
Overrides
View SourceScrollToId(string)
Scrolls to the StageScrollerItem with specified Id
Declaration
public void ScrollToId(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The Id to scroll to |