Intersoft ClientUI Documentation
ErrorStyle Property
See Also  Example Send Feedback
Intersoft.Client.UI.Navigation Namespace > UXFrame Class : ErrorStyle Property






Specifies the style applied in the error page.

Syntax

Visual Basic (Declaration) 
Public Property ErrorStyle As Style
Visual Basic (Usage)Copy Code
Dim instance As UXFrame
Dim value As Style
 
instance.ErrorStyle = value
 
value = instance.ErrorStyle
C# 
public Style ErrorStyle {get; set;}
Delphi 
public read-write property ErrorStyle: Style; 
JScript 
public function get,set ErrorStyle : Style
Managed Extensions for C++ 
public: __property Style* get_ErrorStyle();
public: __property void set_ErrorStyle( 
   Style* value
);
C++/CLI 
public:
property Style^ ErrorStyle {
   Style^ get();
   void set (    Style^ value);
}

Example

The following example shows the XAML template used to define the error page style of the navigation frame.
XAMLCopy Code
<Intersoft:UXPage 
    ... 
    >
    <Intersoft:UXPage.Resources>
        <Style x:Key="CustomErrorPageStyle" TargetType="Intersoft:UXFrameErrorPage">
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="ErrorTextFormat" Value="Unable to navigate to '{0}'"/>
            <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Intersoft:UXFrameErrorPage">
                            <Grid x:Name="LayoutRoot" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                  Background="White">
                                      <Grid.ColumnDefinitions>
                                              <ColumnDefinition Width="81"/>
                                              <ColumnDefinition/>
                                      </Grid.ColumnDefinitions>
                                      <Grid.RowDefinitions>
                                              <RowDefinition Height="64"/>
                                              <RowDefinition Height="5"/>
                                              <RowDefinition Height="34"/>
                                              <RowDefinition/>
                                      </Grid.RowDefinitions>

                                      <Image HorizontalAlignment="Center" Margin="0,15,0,1" 
                                             Source="/Intersoft.Client.UI.Navigation;component/Resources/win7_error48.png" Stretch="None"/>

                                      <TextBlock x:Name="TitleElement" Grid.Column="1" Foreground="#FF903222" FontSize="16" 
                                                 Margin="1,0,0,10" TextWrapping="Wrap" Text="{TemplateBinding ErrorTitle}" VerticalAlignment="Bottom"/>

                                      <Border BorderBrush="#FFD0D0D0" BorderThickness="0,1,0,0" Grid.Column="1" 
                                              Height="1" Margin="0,0,50,0" Grid.Row="1" VerticalAlignment="Center"/>

                                      <TextBlock Grid.Column="1" Foreground="#FF494949" FontSize="14.667" 
                                                 HorizontalAlignment="Left" Grid.Row="2" TextWrapping="Wrap" 
                                                 Text="More Information" VerticalAlignment="Center"/>

                                      <TextBlock x:Name="DetailElement" Grid.Column="1" Foreground="#FF4F4F4F" 
                                                 FontSize="12" Grid.Row="3" TextWrapping="Wrap" Text="{TemplateBinding ErrorDetails}" 
                                                 ScrollViewer.VerticalScrollBarVisibility="Auto"/>
                              </Grid>
                          </ControlTemplate>
                      </Setter.Value>
            </Setter>
        </Style>
    </Intersoft:UXPage.Resources>

    ...

    <Intersoft:UXFrame x:Name="ContentFrame" 
                       EnablePageTransition="True" 
                       TransitionDuration="0.5" 
                       ErrorStyle="{StaticResource CustomErrorPageStyle}">
        <Intersoft:UXFrame.UriMapper>
           ...
        </Intersoft:UXFrame.UriMapper>
    </Intersoft:UXFrame>

    ...

</Intersoft:UXPage>

Remarks

UXFrame includes streamlined error management by providing a built-in friendly error page. When the navigation frame caught an exception that thrown during the navigation process, for instance, the page not found error, UXFrame shows a friendly error page instead of throwing a Javascript error message to the user.

You can customize the error page with your own XAML template by setting the ErrorStyle property of the UXFrame control.

For more information on how to customize error style, see Advanced Features in ClientUI Navigation Framework.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.