Show / Hide Table of Contents

Class AboutDialogCommand

An implementation of ICommand allowing to show an about dialog.

Inheritance
object
DispatcherObject
DependencyObject
AboutDialogCommand
Implements
ICommand
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Equals(object)
DependencyObject.GetHashCode()
DependencyObject.GetLocalValueEnumerator()
DependencyObject.GetValue(DependencyProperty)
DependencyObject.InvalidateProperty(DependencyProperty)
DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, object)
DependencyObject.SetValue(DependencyProperty, object)
DependencyObject.SetValue(DependencyPropertyKey, object)
DependencyObject.ShouldSerializeProperty(DependencyProperty)
DependencyObject.DependencyObjectType
DependencyObject.IsSealed
DispatcherObject.Dispatcher
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
public class AboutDialogCommand : DependencyObject, ICommand
Examples

The following example shows how to use AboutDialogCommand.

<saf:AuxiliaryPaneItem x:Class="App.AboutDialogPane"
                       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" 
                       xmlns:saf="http://www.sartorius.com/SAF"
                       xmlns:resources="clr-namespace:App.Resources"
                       mc:Ignorable="d"
                       Header="{x:Static resources:Resource.AboutDialogPaneHeader}"
                       d:DesignHeight="450" d:DesignWidth="800">
    <saf:AuxiliaryPaneItem.Command>
        <saf:AboutDialogCommand ApplicationId="12345678"
                                CompanyWebsite="www.sartorius.com">
            <saf:AboutDialogCommand.AdditionalInformation>
                <saf:AdditionalInformation Label="Licensed to" Value="{Binding LicensedTo}" />
            </saf:AboutDialogCommand.AdditionalInformation>
        </saf:AboutDialogCommand>
    </saf:AuxiliaryPaneItem.Command>
    <TextBlock TextTrimming="CharacterEllipsis"
               LineHeight="16"
               TextWrapping="Wrap"
               Text="{x:Static resources:Resource.AboutDialogPaneText}" />
</saf:AuxiliaryPaneItem>

The following example shows how to use AboutDialogCommand with grouped modules.

<saf:AuxiliaryPaneItem x:Class="App.AboutAuxiliaryPane"
                       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" 
                       xmlns:saf="http://www.sartorius.com/SAF"
                       xmlns:resources="clr-namespace:App.Resources"
                       xmlns:modularity="clr-namespace:Sartorius.SAF.Presentation.Modularity;assembly=Sartorius.SAF.Presentation"
                       mc:Ignorable="d"
                       Header="{x:Static resources:Resource.AboutDialogPaneHeader}"
                       d:DesignHeight="450" d:DesignWidth="800">
    <Control.Resources>
        <DataTemplate x:Key="LicensedModuleTemplate" DataType="{x:Type modularity:IModule}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Caption}" />
                <TextBlock Grid.Column="1" Text="{Binding Path=Description}" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="UnlicensedModuleTemplate" DataType="{x:Type modularity:IModule}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Caption}" />
                <TextBlock Grid.Column="1" Text="{Binding Path=Description}" />
            </Grid>
        </DataTemplate>
    </Control.Resources>
    <saf:AuxiliaryPaneItem.Command>
        <saf:AboutDialogCommand ApplicationId="12345678"
                                CompanyWebsite="www.sartorius.com">
            <saf:AboutDialogCommand.Groups>
                <saf:ModuleGroupDefinition Caption="Licensed Modules"
                                           DataTemplate="{StaticResource LicensedModuleTemplate}">
                    <saf:ModuleGroupDefinition.Filters>
                        <saf:ModuleFilter IsEnabled="True" />
                    </saf:ModuleGroupDefinition.Filters>
                </saf:ModuleGroupDefinition>

                <saf:ModuleGroupDefinition Caption="Unlicensed Modules"
                                           DataTemplate="{StaticResource UnlicensedModuleTemplate}">
                    <saf:ModuleGroupDefinition.Filters>
                        <saf:ModuleFilter IsEnabled="False" />
                    </saf:ModuleGroupDefinition.Filters>
                </saf:ModuleGroupDefinition>
            </saf:AboutDialogCommand.Groups>
        </saf:AboutDialogCommand>
    </saf:AuxiliaryPaneItem.Command>
    <TextBlock TextTrimming="CharacterEllipsis"
               LineHeight="16"
               TextWrapping="Wrap"
               Text="{x:Static resources:Resource.AboutDialogPaneText}" />
</saf:AuxiliaryPaneItem>

The following example shows how to use AboutDialogCommand and configure the about dialog buttons using ButtonDescriptions.

<saf:AuxiliaryPaneItem x:Class="App.AboutDialogAuxiliaryPane"
                       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" 
                       xmlns:saf="http://www.sartorius.com/SAF"
                       xmlns:resources="clr-namespace:App.Resources"
                       mc:Ignorable="d"
                       Header="{x:Static resources:Resource.AboutDialogPaneHeader}"
                       d:DesignHeight="450" d:DesignWidth="800">
    <saf:AuxiliaryPaneItem.Command>
        <saf:AboutDialogCommand ApplicationId="12345678"
                                CompanyWebsite="www.sartorius.com">
            <saf:AboutDialogCommand.ButtonDescriptions>
                <saf:AboutDialogButtonDescription AutomationId="64989aa6-1f68-4082-8ce7-d2db979b3c62" Caption="System Information" Command="{x:Static saf:AboutDialogRoutedCommands.SystemInfoCommand}" />
                <saf:AboutDialogButtonDescription AutomationId="2C539EF5-7AAE-4DD9-B5A4-128626C91194" Caption="Errors" Command="{x:Static saf:AboutDialogRoutedCommands.ShowErrorsCommand}" />
            </saf:AboutDialogCommand.ButtonDescriptions>
        </saf:AboutDialogCommand>
    </saf:AuxiliaryPaneItem.Command>
    <TextBlock TextTrimming="CharacterEllipsis"
               LineHeight="16"
               TextWrapping="Wrap"
               Text="{x:Static resources:Resource.AboutDialogPaneText}" />
</saf:AuxiliaryPaneItem>

Constructors

View Source

AboutDialogCommand()

Initializes a new instance of the AboutDialogCommand class

Declaration
public AboutDialogCommand()

Fields

View Source

AdditionalSendInformationProperty

Identifies the AdditionalSendInformation dependency property.

Declaration
public static readonly DependencyProperty AdditionalSendInformationProperty
Field Value
Type Description
DependencyProperty
View Source

ApplicationIdProperty

Identifies the ApplicationId dependency property.

Declaration
public static readonly DependencyProperty ApplicationIdProperty
Field Value
Type Description
DependencyProperty
View Source

ApplicationLogoProperty

Identifies the ApplicationLogo dependency property.

Declaration
public static readonly DependencyProperty ApplicationLogoProperty
Field Value
Type Description
DependencyProperty
View Source

ApplicationVersionProperty

Identifies the ApplicationVersion dependency property.

Declaration
public static readonly DependencyProperty ApplicationVersionProperty
Field Value
Type Description
DependencyProperty
View Source

CompanyAddressProperty

Identifies the CompanyAddress dependency property.

Declaration
public static readonly DependencyProperty CompanyAddressProperty
Field Value
Type Description
DependencyProperty
View Source

CompanyWebsiteProperty

Identifies the CompanyWebsite dependency property.

Declaration
public static readonly DependencyProperty CompanyWebsiteProperty
Field Value
Type Description
DependencyProperty
View Source

CopyrightProperty

Identifies the Copyright dependency property.

Declaration
public static readonly DependencyProperty CopyrightProperty
Field Value
Type Description
DependencyProperty
View Source

EmailSubjectProperty

Identifies the EmailSubject dependency property.

Declaration
public static readonly DependencyProperty EmailSubjectProperty
Field Value
Type Description
DependencyProperty
View Source

InstallationDirProperty

Identifies the InstallationDir dependency property.

Declaration
public static readonly DependencyProperty InstallationDirProperty
Field Value
Type Description
DependencyProperty
View Source

IsModuleListVisibleProperty

Identifies the IsModuleListVisible dependency property.

Declaration
public static readonly DependencyProperty IsModuleListVisibleProperty
Field Value
Type Description
DependencyProperty
View Source

LicensedToProperty

Identifies the LicensedTo dependency property.

Declaration
public static readonly DependencyProperty LicensedToProperty
Field Value
Type Description
DependencyProperty
View Source

SendEmailToProperty

Identifies the SendEmailTo dependency property.

Declaration
public static readonly DependencyProperty SendEmailToProperty
Field Value
Type Description
DependencyProperty
View Source

ShowHelpProperty

Identifies the ShowHelp dependency property.

Declaration
public static readonly DependencyProperty ShowHelpProperty
Field Value
Type Description
DependencyProperty

Properties

View Source

AdditionalInformation

Gets the additional information shown in the about dialog.

Declaration
public AdditionalInformationCollection AdditionalInformation { get; }
Property Value
Type Description
AdditionalInformationCollection
View Source

AdditionalSendInformation

Gets or sets a (formatted) text that is appended to the email text.

Declaration
public string AdditionalSendInformation { get; set; }
Property Value
Type Description
string
View Source

ApplicationId

Gets or sets the id of the application. This is a unique id per installation.

Declaration
public string ApplicationId { get; set; }
Property Value
Type Description
string
View Source

ApplicationLogo

Gets or sets the logo of the application

Declaration
public object ApplicationLogo { get; set; }
Property Value
Type Description
object
Remarks

The value can be either a Wpf Element containing an application Logo or a string containing the name.

View Source

ApplicationVersion

Gets or sets the application version

Declaration
public string ApplicationVersion { get; set; }
Property Value
Type Description
string
Remarks

Uses the version of the executing assembly as default value.

View Source

ButtonDescriptions

Gets the button descriptions.

Declaration
public AboutDialogButtonDescriptionCollection ButtonDescriptions { get; }
Property Value
Type Description
AboutDialogButtonDescriptionCollection
Remarks

When setting any button, the default buttons get cleared. You can add the default button functionality by using the routed commands found in AboutDialogRoutedCommands.

Examples

The following example shows how to use AboutDialogCommand and configure the about dialog buttons using ButtonDescriptions.

<saf:AuxiliaryPaneItem x:Class="App.AboutDialogAuxiliaryPane"
                       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" 
                       xmlns:saf="http://www.sartorius.com/SAF"
                       xmlns:resources="clr-namespace:App.Resources"
                       mc:Ignorable="d"
                       Header="{x:Static resources:Resource.AboutDialogPaneHeader}"
                       d:DesignHeight="450" d:DesignWidth="800">
    <saf:AuxiliaryPaneItem.Command>
        <saf:AboutDialogCommand ApplicationId="12345678"
                                CompanyWebsite="www.sartorius.com">
            <saf:AboutDialogCommand.ButtonDescriptions>
                <saf:AboutDialogButtonDescription AutomationId="64989aa6-1f68-4082-8ce7-d2db979b3c62" Caption="System Information" Command="{x:Static saf:AboutDialogRoutedCommands.SystemInfoCommand}" />
                <saf:AboutDialogButtonDescription AutomationId="2C539EF5-7AAE-4DD9-B5A4-128626C91194" Caption="Errors" Command="{x:Static saf:AboutDialogRoutedCommands.ShowErrorsCommand}" />
            </saf:AboutDialogCommand.ButtonDescriptions>
        </saf:AboutDialogCommand>
    </saf:AuxiliaryPaneItem.Command>
    <TextBlock TextTrimming="CharacterEllipsis"
               LineHeight="16"
               TextWrapping="Wrap"
               Text="{x:Static resources:Resource.AboutDialogPaneText}" />
</saf:AuxiliaryPaneItem>
See Also
AboutDialogRoutedCommands
AboutDialogButtonDescriptionCollection
AboutDialogButtonDescription
IAboutDialogButtonDescription
View Source

CompanyAddress

Gets or sets the full address of the company.

Declaration
public string CompanyAddress { get; set; }
Property Value
Type Description
string
Remarks

Should be formatted either by using a wpf element or regular expression.

View Source

CompanyWebsite

Gets or sets the url to the website of the company.

Declaration
public string CompanyWebsite { get; set; }
Property Value
Type Description
string
Remarks

Uses "www.sartorius.com" as default value.

View Source

Copyright

Gets or sets the copyright.

Declaration
public string Copyright { get; set; }
Property Value
Type Description
string
View Source

EmailSubject

Gets or sets the subject of the email.

Declaration
public string EmailSubject { get; set; }
Property Value
Type Description
string
View Source

Groups

Gets the configured groups for the modules.

Declaration
public ModuleGroupDefinitionCollection Groups { get; }
Property Value
Type Description
ModuleGroupDefinitionCollection
View Source

InstallationDir

Gets or sets the installation directory of the application.

Declaration
public string InstallationDir { get; set; }
Property Value
Type Description
string
Remarks

Uses the ExecutablePath as default value.

View Source

IsModuleListVisible

Indicates whether the module list is visible.

Declaration
public bool IsModuleListVisible { get; set; }
Property Value
Type Description
bool
View Source

LicensedTo

Gets or sets the license owner.

Declaration
public string LicensedTo { get; set; }
Property Value
Type Description
string
View Source

SendEmailTo

Gets or sets the email where all available information is sent to.

Declaration
public string SendEmailTo { get; set; }
Property Value
Type Description
string
View Source

ShowHelp

Invoked when the user clicks the help icon in the about dialog.

Declaration
public bool ShowHelp { get; set; }
Property Value
Type Description
bool

Methods

View Source

CanExecute(object)

Determines whether the command can execute in its current state.

Declaration
public bool CanExecute(object parameter)
Parameters
Type Name Description
object parameter

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Returns
Type Description
bool

true if this command can be executed; otherwise, false.

View Source

Execute(object)

Defines the method to be called when the command is invoked.

Declaration
public void Execute(object parameter)
Parameters
Type Name Description
object parameter

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Events

View Source

CanExecuteChanged

Occurs when changes take place that affect whether or not the command should execute.

Declaration
public event EventHandler CanExecuteChanged
Event Type
Type Description
EventHandler

Implements

ICommand

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
DependencyObjectExtensions.XamlClone<T>(T)
DependencyObjectExtensions.FindAncestor<T>(DependencyObject)
DependencyObjectExtensions.FindFirstChildByType<T>(DependencyObject)
DependencyObjectExtensions.FindLogicalAncestor<T>(DependencyObject)
DependencyObjectExtensions.GetChildrenByType<T>(DependencyObject)
DependencyObjectExtensions.GetContainer(DependencyObject)
DependencyObjectExtensions.SetContainer(DependencyObject, CompositionContainer)

See Also

AboutDialogRoutedCommands
AboutDialogButtonDescriptionCollection
AboutDialogButtonDescription
ModuleGroupDefinitionCollection
ModuleGroupDefinition
AdditionalInformationCollection
AdditionalInformation
IAboutDialogButtonDescription
  • View Source
Back to top Generated by DocFX