Source

main-vinayFork / Source / Excel / Excel.AddIn / Excel.AddIn / View / PostFileViewPane.xaml

<Window
    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:i="http://schemas.microsoft.com/expression/2010/interactivity" 
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
    xmlns:local="clr-namespace:Microsoft.Research.Dcxl.Excel.Addin"
    x:Class="Microsoft.Research.Dcxl.Excel.Addin.PostFileViewPane"
    x:Name="Window"
    Title="Post file to Repository"
    Width="410" Height="328" Background="{x:Null}" AllowsTransparency="True" WindowStyle="None">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Resources/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <BooleanToVisibilityConverter x:Key="VisibilityConverter"></BooleanToVisibilityConverter>
            <local:RepositoryViewModel x:Key="Model"/>
            <Style x:Key="MetroButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource DefaultButtonStyle}">
                <Setter Property="MinWidth" Value="75"/>
                <Setter Property="Height" Value="22"/>
                <Setter Property="FontSize" Value="13"/>
            </Style>
        </ResourceDictionary>
    </Window.Resources>

    <Window.DataContext>
        <Binding Source="{StaticResource Model}"/>
    </Window.DataContext>

    <Grid x:Name="LayoutRoot">
        <HeaderedContentControl Tag="Enter details of the Repository" Header="REPOSITORY" Style="{DynamicResource HeaderedWindowStyle}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="40"/>
                </Grid.RowDefinitions>
                <StackPanel>
                    <DockPanel LastChildFill="True" Margin="0,10,0,0" VerticalAlignment="Top" Grid.Row="1" >
                        <TextBlock Text="Name" Style="{DynamicResource PostfileLabelStyle}" />
                        <TextBox Margin="0,0,15,0"  BorderBrush="#FF7E7E7E" BorderThickness="1" Style="{DynamicResource InputTextboxStyle}"
                                 Text="{Binding RepositoryName, Mode=TwoWay}"/>
                    </DockPanel>
                    <DockPanel LastChildFill="True" Margin="0,10,0,0" VerticalAlignment="Top" Grid.Row="1" >
                        <TextBlock Text="URL" Style="{DynamicResource PostfileLabelStyle}" />
                        <TextBox Margin="0,0,15,0"  BorderBrush="#FF7E7E7E" BorderThickness="1" Style="{DynamicResource InputTextboxStyle}"
                                 Text="{Binding RepositoryLink, Mode=TwoWay}"/>
                    </DockPanel>
                    <DockPanel LastChildFill="True" Margin="0,10,0,0" VerticalAlignment="Top" Grid.Row="1" >
                        <TextBlock Text="User Name" Style="{DynamicResource PostfileLabelStyle}" />
                        <TextBox  Margin="0,0,15,0"  BorderBrush="#FF7E7E7E" BorderThickness="1" Style="{DynamicResource InputTextboxStyle}"
                                  Text="{Binding UserName, Mode=TwoWay}"/>
                    </DockPanel>
                    <DockPanel LastChildFill="True" Margin="0,10,0,0" VerticalAlignment="Top" Grid.Row="1" >
                        <TextBlock Text="Password" Style="{DynamicResource PostfileLabelStyle}" />
                        <PasswordBox x:Name="pwdUserPassword" Margin="0,0,15,0"  BorderBrush="#FF7E7E7E" BorderThickness="1" Style="{DynamicResource PasswordBoxStyle}"
                                     />
                    </DockPanel>
                </StackPanel>
                <Border Background="White" Grid.Row="1">
                    <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center"  Margin="0,0,15,0" Orientation="Horizontal">
                        <Button Content="OK" Width="75" Style="{DynamicResource SaveCancelButtonStyle}" IsDefault="True" IsCancel="False"
                                Command="{Binding PostFileCommand}" CommandParameter="{Binding}"/>
                        <Button Content="Cancel" Width="75" Style="{DynamicResource SaveCancelButtonStyle}" Margin="10,0,0,0" IsCancel="True"/>
                    </StackPanel>
                </Border>
            </Grid>
        </HeaderedContentControl>
    </Grid>
</Window>