Show / Hide Table of Contents

Class AboutDialogCommand

An implementation of System.Windows.Input.ICommand allowing to show an about dialog.

Inheritance
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
AboutDialogCommand
Implements
System.Windows.Input.ICommand
System.Windows.DependencyObject.ClearValue(System.Windows.DependencyProperty)
System.Windows.DependencyObject.ClearValue(System.Windows.DependencyPropertyKey)
System.Windows.DependencyObject.CoerceValue(System.Windows.DependencyProperty)
System.Windows.DependencyObject.Equals(System.Object)
System.Windows.DependencyObject.GetHashCode()
System.Windows.DependencyObject.GetLocalValueEnumerator()
System.Windows.DependencyObject.GetValue(System.Windows.DependencyProperty)
System.Windows.DependencyObject.InvalidateProperty(System.Windows.DependencyProperty)
System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
System.Windows.DependencyObject.ReadLocalValue(System.Windows.DependencyProperty)
System.Windows.DependencyObject.SetCurrentValue(System.Windows.DependencyProperty, System.Object)
System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, System.Object)
System.Windows.DependencyObject.SetValue(System.Windows.DependencyPropertyKey, System.Object)
System.Windows.DependencyObject.ShouldSerializeProperty(System.Windows.DependencyProperty)
System.Windows.DependencyObject.DependencyObjectType
System.Windows.DependencyObject.IsSealed
System.Windows.Threading.DispatcherObject.Dispatcher
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.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
System.Windows.DependencyProperty
View Source

ApplicationIdProperty

Identifies the ApplicationId dependency property.

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

ApplicationLogoProperty

Identifies the ApplicationLogo dependency property.

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

ApplicationVersionProperty

Identifies the ApplicationVersion dependency property.

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

CompanyAddressProperty

Identifies the CompanyAddress dependency property.

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

CompanyWebsiteProperty

Identifies the CompanyWebsite dependency property.

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

CopyrightProperty

Identifies the Copyright dependency property.

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

EmailSubjectProperty

Identifies the EmailSubject dependency property.

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

InstallationDirProperty

Identifies the InstallationDir dependency property.

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

IsModuleListVisibleProperty

Identifies the IsModuleListVisible dependency property.

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

LicensedToProperty

Identifies the LicensedTo dependency property.

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

SendEmailToProperty

Identifies the SendEmailTo dependency property.

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

ShowHelpProperty

Identifies the ShowHelp dependency property.

Declaration
public static readonly DependencyProperty ShowHelpProperty
Field Value
Type Description
System.Windows.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

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

ApplicationId

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

ApplicationLogo

Declaration
public object ApplicationLogo { get; set; }
Property Value
Type Description
System.Object
View Source

ApplicationVersion

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

The default is read from the System.Reflection.AssemblyInformationalVersionAttribute of the entry assembly.

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
Sartorius.SAF.Presentation.Controls.AboutDialog.IAboutDialogButtonDescription
View Source

CompanyAddress

Declaration
public string CompanyAddress { get; set; }
Property Value
Type Description
System.String
View Source

CompanyWebsite

Declaration
public string CompanyWebsite { get; set; }
Property Value
Type Description
System.String
View Source

Copyright

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

EmailSubject

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

Groups

Gets the configured groups for the modules.

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

InstallationDir

Declaration
public string InstallationDir { get; set; }
Property Value
Type Description
System.String
View Source

IsModuleListVisible

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

LicensedTo

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

SendEmailTo

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

ShowHelp

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

Methods

View Source

CanExecute(Object)

Declaration
public bool CanExecute(object parameter)
Parameters
Type Name Description
System.Object parameter
Returns
Type Description
System.Boolean
View Source

Execute(Object)

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

Events

View Source

CanExecuteChanged

Declaration
public event EventHandler CanExecuteChanged
Event Type
Type Description
System.EventHandler

Implements

System.Windows.Input.ICommand

Extension Methods

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

See Also

AboutDialogRoutedCommands
AboutDialogButtonDescriptionCollection
AboutDialogButtonDescription
ModuleGroupDefinitionCollection
ModuleGroupDefinition
AdditionalInformationCollection
AdditionalInformation
Sartorius.SAF.Presentation.Controls.AboutDialog.IAboutDialogButtonDescription
  • View Source
Back to top Generated by DocFX