Source

main / Source / Excel / Excel.AddIn / Excel.AddIn / View / Usercontrols / PostSuccessError.xaml

Full commit
Naethra D ba1cb57 



















































<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" FontFamily="Segoe UI"
    x:Class="DataUp.Excel.Addin.PostSuccessError"
    x:Name="UserControl"
    d:DesignWidth="640" d:DesignHeight="480">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../../Resources/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <Style x:Key="PostSucessErrorControl" TargetType="{x:Type ContentControl}">
                <Setter Property="Foreground" Value="{DynamicResource GreenButtonBrush}"/>
                <Setter Property="FontSize" Value="12"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="IsTabStop" Value="False"/>
                <Setter Property="Content" Value="FILE PUBLISHED SUCCESSFULLY"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ContentControl}">
                            <StackPanel Orientation="Horizontal"  >
                                <Image x:Name="Icon" Width="32" Height="32" Source="pack://application:,,,/DataUp.Addin;component/Resources/Images/post_sucess.png"/>
                                <ContentPresenter x:Name="Content" TextBlock.Foreground="{DynamicResource GreenButtonBrush}" Margin="10,0" VerticalAlignment="Center"/>
                            </StackPanel>
                            <ControlTemplate.Triggers>
                                <Trigger Property="Tag" Value="Error">
                                    <Setter Property="Content" Value="FILE POST UNSCUCCESSFUL"/>
                                    <Setter Property="TextBlock.Foreground" TargetName="Content" Value="{DynamicResource RedBrush}"/>
                                    <Setter Property="Source" TargetName="Icon" Value="pack://application:,,,/DataUp.Addin;component/Resources/Images/post_un_sucess.png"/>
                                    <Setter Property="Foreground" Value="{DynamicResource RedBrush}"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Top" MinWidth="450" Margin="0,50,0,0">
            <ContentControl x:Name="contentControl" Tag="{Binding ElementName=UserControl,Path=Tag}" Style="{DynamicResource PostSucessErrorControl}"/>
            <Rectangle Fill="#FFE5E5E5" Height="1" Margin="0,10" SnapsToDevicePixels="True"/>
            <TextBlock Text="{Binding}" Style="{DynamicResource DescriptionTextStyle}" Width="Auto" HorizontalAlignment="Center"/>
            <Button Content="CLOSE" Style="{DynamicResource GreenButton}" Margin="10,10,0,0" HorizontalAlignment="Center" 
                    Background="{Binding Foreground, ElementName=contentControl}" IsCancel="True"/>
        </StackPanel>
    </Grid>
</UserControl>