Version

CancelCommand Field

Cancels the print operation.
Syntax
'Declaration
 
Public Shared CancelCommand As RoutedUICommand
public static RoutedUICommand CancelCommand
Example
The following example shows how to use CancelCommand in your ControlTemplate

<Style TargetType="{x:Type igRep:ProgressWindow}">
    
<Setter Property="Template">
        
<Setter.Value>
            
<ControlTemplate TargetType="{x:Type igRep:ProgressWindow}">
                
<StackPanel HorizontalAlignment="Stretch">
                    
<Label  x:Name="PART_Description" Height="20" Margin="10,0,0,0"  Padding="0" Content="Progress Information "/>
                    
<ProgressBar x:Name="PART_ProgresBar" Margin="10,0,0,0" Height="20" />
                    
<Button Margin="0,5,0,0"  Width="75" HorizontalAlignment="Right"
                        
Command="{x:Static igRep:ProgressWindow.CancelCommand}" Content="Cancel"/>

                
</StackPanel>
            
</ControlTemplate>
        
</Setter.Value>
    
</Setter>
</Style>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also