Source

main / Source / Excel / Excel.AddIn / Excel.AddIn / View / Usercontrols / PostControl.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"
    xmlns:local="clr-namespace:DataUp.Excel.Addin"
    mc:Ignorable="d"
    x:Class="DataUp.Excel.Addin.PostControl"
    x:Name="UserControl" d:DesignWidth="500">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../../Resources/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <BooleanToVisibilityConverter x:Key="VisibilityConverter"></BooleanToVisibilityConverter>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TextBlock Text="You are now ready to post your curated document to the repository of your choice. You can select the repository from the list, and provide your credentials for the repository." 
                   Style="{DynamicResource DescriptionTextStyle}" Margin="0,10" Foreground="{DynamicResource LabelForeground}"/>
        <StackPanel Grid.Row="1" Margin="{DynamicResource ControlMargin}">
            <StackPanel Style="{DynamicResource StackItemPanel}" >
                <TextBlock Text="Repository Name" Style="{DynamicResource LabelStyle}">
                    <Run Text="*" Style="{DynamicResource RunLabelErrorStyle}"/>
                </TextBlock>
                <ComboBox Style="{DynamicResource MetroCombobox}" ItemsSource="{Binding RepositoryList}" DisplayMemberPath="RepositoryName"
                          SelectedItem="{Binding RepositoryDetailsViewModel}"/>
            </StackPanel>

            <StackPanel Style="{DynamicResource StackItemPanel}" Visibility="{Binding RepositoryDetailsViewModel.IsPasswordRequired, Converter={StaticResource VisibilityConverter}}" >
                <TextBlock Text="Username" Style="{DynamicResource LabelStyle}">
                    <Run Text="*" Style="{DynamicResource RunLabelErrorStyle}"/>
                </TextBlock>
                <TextBox Text="{Binding RepositoryDetailsViewModel.UserName}"
                         Style="{DynamicResource TextBoxStyle}"/>
            </StackPanel>
            <StackPanel Style="{DynamicResource StackItemPanel}" Visibility="{Binding RepositoryDetailsViewModel.IsPasswordRequired, Converter={StaticResource VisibilityConverter}}">
                <TextBlock Text="Password" Style="{DynamicResource LabelStyle}">
                    <Run Text="*" Style="{DynamicResource RunLabelErrorStyle}"/>
                </TextBlock>
                <PasswordBox Style="{DynamicResource PasswordBoxStyle}" local:PasswordHelper.BindPassword="true"
                             local:PasswordHelper.BoundPassword="{Binding Path=RepositoryDetailsViewModel.UserPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
            </StackPanel>

            <StackPanel Style="{DynamicResource StackItemPanel}" Orientation="Horizontal" >
                <CheckBox Content="I accept" IsChecked="{Binding RepositoryDetailsViewModel.IsAgreementAccepted, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

                <Button Style="{DynamicResource HyperlinkButton}" Margin="2,5,0,0" Content="User Agreement" Command="{Binding RepositoryDetailsViewModel.GetUserAgreementCommand}"/>
            </StackPanel>
            <Border Margin="0,5" CornerRadius="4" BorderBrush="#FFe7e7e7" Background="White" BorderThickness="1" Height="75" SnapsToDevicePixels="True" Visibility="{Binding RepositoryDetailsViewModel.ShowUserAgreement, Converter={StaticResource VisibilityConverter}}">
                <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" >
                    <TextBlock Margin="3" FontSize="12" Style="{DynamicResource AutoLabelStyle}" Text="{Binding RepositoryDetailsViewModel.UserAgreement}" TextWrapping="Wrap" />
                </ScrollViewer>
            </Border>
        </StackPanel>
    </Grid>
</UserControl>