<Window x:Class="CommunicationSampleApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:custom="clr-namespace:Avaya.ClientServices.Media;assembly=scpmediadll"
        xmlns:AvayaMedia="clr-namespace:Avaya.ClientServices.Media;assembly=scpmediadll" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:CommunicationSampleApp"
        mc:Ignorable="d"
        xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" 
        xmlns:my="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
        xmlns:System="clr-namespace:System;assembly=mscorlib"
        Title="Avaya Client SDK Sample App" Height="512" Width="350" Closing="Window_Closing" Loaded="Window_Loaded">
    <Window.Resources>
        <!-- You can implement your own BooleanToVisibilityConverter but there is one already implemented. So the next line creates an instance of the BooleanToVisibilityConverter that you will be able to reference with the specified key -->
        <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    </Window.Resources>
    <Grid Margin="0,0,2,0" RenderTransformOrigin="0.554,0.472">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0*"/>
            <ColumnDefinition Width="157*"/>
            <ColumnDefinition Width="12*"/>
            <ColumnDefinition Width="395*"/>
        </Grid.ColumnDefinitions>

        <Grid Grid.ColumnSpan="4" Name="AvayaClientSDKGrid" Visibility="{Binding Path=IsAvayaClientSDKGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Left" Height="481" Margin="0,10,0,0" VerticalAlignment="Top" Width="340">
            <Label x:Name="sampleAppLabel" Content="Communication Package Sample App" HorizontalAlignment="Left" Margin="14,10,0,0" VerticalAlignment="Top" Height="34" Width="243" FontSize="13" RenderTransformOrigin="0.407,0.471" FontStyle="Italic"/>
            <Button x:Name="settingsBtn" Visibility="Visible" Content="Settings" HorizontalAlignment="Left" Margin="108,67,0,0" VerticalAlignment="Top" Width="121" Height="27" FontSize="13" Click="settingsBtn_Click"/>
            <Button x:Name="callServiceBtn" IsEnabled="{Binding CallServiceBtnEnabled}" Visibility="Visible" Content="Call Service" HorizontalAlignment="Left" Margin="108,120,0,0" VerticalAlignment="Top" Width="121" Height="27" FontSize="13" Click="callServiceBtn_Click"/>
            <Button x:Name="contactServiceBtn" IsEnabled="{Binding ContactServiceBtnEnabled}" Visibility="Visible" Content="Contact Service" HorizontalAlignment="Left" Margin="107,177,0,0" VerticalAlignment="Top" Width="121" Height="27" FontSize="13" Click="contactServiceBtn_Click"/>
            <Button x:Name="callLogsBtn" IsEnabled="{Binding CallLogsBtnEnabled}" Visibility="Visible" Content="Call Logs" HorizontalAlignment="Left" Margin="107,237,0,0" VerticalAlignment="Top" Width="121" Height="27" FontSize="13" Click="callLogsBtn_Click"/>
            <Button x:Name="messagingServiceBtn" IsEnabled="{Binding MessagingServiceBtnEnabled}" Visibility="Visible" Content="Messaging Service" HorizontalAlignment="Left" Margin="108,292,0,0" VerticalAlignment="Top" Width="121" Height="27" Click="messagingServiceBtn_Click"/>
        </Grid>
        <Grid Grid.ColumnSpan="4" Name="SettingsGrid" Visibility="{Binding Path=IsSettingsGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Left" Height="481" VerticalAlignment="Top" Width="340">
            <Label x:Name="settingsLabel" Content="Settings" HorizontalAlignment="Left" Margin="118,15,0,0" VerticalAlignment="Top" Height="27" Width="67" FontSize="13"/>
            <Button x:Name="settingsBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" Height="22" Click="settingsBackBtn_Click" FontSize="13"/>
            <Button x:Name="callServiceSettingsBtn" Content="Call Service" HorizontalAlignment="Left" Margin="91,75,0,0" VerticalAlignment="Top" Width="121" Height="28" FontSize="13" Click="callServiceSettingsBtn_Click"/>
            <Button x:Name="messagingServiceSettingsBtn" Visibility="Visible" Content="Messaging Service" HorizontalAlignment="Left" Margin="91,129,0,0" VerticalAlignment="Top" Width="121" Height="28" Click="messagingServiceSettingsBtn_Click" FontSize="13" RenderTransformOrigin="0.471,0.286"/>
            <Button x:Name="deviceServiceSettingsBtn" Content="Device Service" HorizontalAlignment="Left" Margin="91,181,0,0" VerticalAlignment="Top" Width="121" Height="28" Click="deviceServiceSettingsBtn_Click" FontSize="13"/>
            <Button x:Name="aboutBtn" Content="About" HorizontalAlignment="Left" Margin="91,234,0,0" VerticalAlignment="Top" Width="121" Height="28" Click="aboutBtn_Click" FontSize="13"/>
        </Grid>
        <Grid Grid.ColumnSpan="4" Name="CallServiceSettingsGrid" Visibility="{Binding Path=IsCallServiceSettingsGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Left" Height="481" Margin="0,-2,0,0" VerticalAlignment="Top" Width="340">
            <Label x:Name="callServiceSettingsLabel" Content="Settings - Call Service" HorizontalAlignment="Left" Margin="120,12,0,0" VerticalAlignment="Top" Height="33" Width="150" FontSize="13"/>
            <Button x:Name="callServiceSettingsBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" Height="22" Click="callServiceSettingsBackBtn_Click" FontSize="13" RenderTransformOrigin="0.327,0.636"/>
            <Label x:Name="sipServerAddressLabel" Content="Address" HorizontalAlignment="Left" Margin="15,85,0,0" VerticalAlignment="Top" Width="77" Height="33" FontSize="13"/>
            <TextBox x:Name="sipServerAddress" Text="{Binding Path=SipServerAddressText}" HorizontalAlignment="Left" Height="27" Margin="121,85,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198" FontSize="13"/>
            <Label x:Name="sipPortLabel" Content="Port" HorizontalAlignment="Left" Margin="15,134,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.12,1.258" Height="40" Width="68" FontSize="13"/>
            <TextBox x:Name="sipPort" HorizontalAlignment="Left" Height="27" Margin="120,135,0,0" TextWrapping="Wrap" Text="{Binding Path=SipPortText}" VerticalAlignment="Top" Width="198" FontSize="13"/>
            <TextBox x:Name="sipDomain" Text="{Binding Path=SipDomainText}"  HorizontalAlignment="Left" Height="27" Margin="121,187,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198" FontSize="13"/>
            <Label x:Name="sipDomainLabel" Content="Domain" HorizontalAlignment="Left" Margin="14,188,0,0" VerticalAlignment="Top" Height="31" Width="68" FontSize="13"/>
            <Label x:Name="sipTransportLabel" Content="TLS" HorizontalAlignment="Left" Margin="15,232,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.123,1.496" Height="24" Width="77" FontSize="13"/>
            <Label x:Name="sipUsernameLabel" Content="Extension" HorizontalAlignment="Left" Margin="14,283,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.601,1.487" Height="25" Width="68" FontSize="13"/>
            <TextBox x:Name="sipUsername" Text="{Binding Path=SipUsernameText}"  HorizontalAlignment="Left" Height="27" Margin="121,278,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198" FontSize="13"/>
            <Label x:Name="sipPasswordLabel" Content="Password" HorizontalAlignment="Left" Margin="15,330,0,0" VerticalAlignment="Top" Height="35" Width="86" FontSize="13"/>
            <PasswordBox x:Name="sipPassword" HorizontalAlignment="Left" Height="27" Margin="124,331,0,0" VerticalAlignment="Top" Width="198" FontSize="13"/>
            <Label x:Name="sipLoginStatusLabel" Content="Status:" HorizontalAlignment="Left" Margin="96,374,0,0" VerticalAlignment="Top" Height="33" Width="61" FontSize="13"/>
            <Label x:Name="sipLoginStatus" Content="{Binding Path=SipLoginStatusContent}" HorizontalAlignment="Left" Margin="157,374,0,0" VerticalAlignment="Top" Height="27" Width="106" FontSize="13"/>
            <Button x:Name="applyBtn" Content="Apply" HorizontalAlignment="Left" Margin="120,423,0,0" VerticalAlignment="Top" Width="110" Height="27" FontSize="13" Click="applyBtn_Click"/>
            <Button x:Name="sipTransportBtn" Content="{Binding Path = SipTransportBtnContent}" HorizontalAlignment="Left" Margin="254,233,0,0" VerticalAlignment="Top" Width="65" Height="24" FontSize="13" Click="sipTransportBtn_Click" RenderTransformOrigin="0.785,0.5"/>
        </Grid>
        <Grid Name="MessagingServiceSettingsGrid" Visibility="{Binding Path=IsMessagingServiceSettingsGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Grid.ColumnSpan="4" HorizontalAlignment="Left" Height="481" Margin="5,0,0,0" VerticalAlignment="Top" Width="340">
            <Label x:Name="messagingServiceSettingsLabel" Content="Settings - Messaging Service" HorizontalAlignment="Left" Margin="85,15,0,0" VerticalAlignment="Top" Width="207" FontSize="13"/>
            <Label x:Name="messagingServerAddressLabel" Content="Server Address" HorizontalAlignment="Left" Margin="10,85,0,0" VerticalAlignment="Top" Width="101" FontSize="13"/>
            <TextBox x:Name="messagingServerAddress" Text="{Binding Path=MessagingServerAddressText}"  HorizontalAlignment="Left" Height="27" Margin="121,85,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198" FontSize="13"/>
            <Label x:Name="messagingPortLabel" Content="Port" HorizontalAlignment="Left" Margin="10,139,0,0" VerticalAlignment="Top" Width="101" FontSize="13"/>
            <TextBox x:Name="messagingPort" Text="{Binding Path=MessagingPortText}" HorizontalAlignment="Left" Height="27" Margin="121,139,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198" FontSize="13"/>
            <Label x:Name="messagingRefreshlabel" Content="Refresh" HorizontalAlignment="Left" Margin="10,248,0,0" VerticalAlignment="Top" Width="101" FontSize="13"/>
            <Label x:Name="messagingUserNamelabel" Content="Username" HorizontalAlignment="Left" Margin="10,296,0,0" VerticalAlignment="Top" Width="101" FontSize="13"/>
            <TextBox x:Name="messagingUsername" Text="{Binding Path=MessagingUsernameText}" HorizontalAlignment="Left" Height="27" Margin="121,300,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198" FontSize="13"/>
            <Label x:Name="messagingPasswordlabel" Content="Password" HorizontalAlignment="Left" Margin="10,347,0,0" VerticalAlignment="Top" Width="101" FontSize="13"/>
            <PasswordBox x:Name="messagingPassword" HorizontalAlignment="Left" Margin="121,347,0,0" VerticalAlignment="Top" Width="198" Height="27" FontSize="13"/>
            <Button x:Name="messagingApplyBtn" Content="Apply" HorizontalAlignment="Left" Margin="115,433,0,0" VerticalAlignment="Top" Width="110" Height="27" FontSize="13" Click="messagingApplyBtn_Click"/>
            <Button x:Name="messagingServiceSettingsBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,18,0,0" VerticalAlignment="Top" Width="49" RenderTransformOrigin="0.719,0.562" Click="messagingServiceSettingsBackBtn_Click" Height="22" FontSize="13"/>
            <ComboBox x:Name="messagingPollInterval" HorizontalAlignment="Left" Margin="171,248,0,0" VerticalAlignment="Top" Width="148" SelectedIndex="0" FontSize="13" Height="27">
                <ComboBoxItem>0 (Push)</ComboBoxItem>
                <ComboBoxItem>1</ComboBoxItem>
                <ComboBoxItem>2</ComboBoxItem>
                <ComboBoxItem>5</ComboBoxItem>
                <ComboBoxItem>15</ComboBoxItem>
                <ComboBoxItem>60</ComboBoxItem>
                <ComboBoxItem>Manual</ComboBoxItem>
            </ComboBox>
            <Label x:Name="messagingLoginStatus" Content="{Binding Path=MessagingLoginStatusContent}" HorizontalAlignment="Left" Margin="155,392,0,0" VerticalAlignment="Top" Width="115" FontSize="13"/>
            <Label x:Name="messagingLoginStatuslabel" Content="Status:" HorizontalAlignment="Left" Margin="85,392,0,0" VerticalAlignment="Top" Width="65" FontSize="13" RenderTransformOrigin="0.462,1.259"/>
            <Label x:Name="tlsLabel" Content="TLS" HorizontalAlignment="Left" Margin="10,186,0,0" VerticalAlignment="Top" Width="101" FontSize="13"/>
            <Button x:Name="messagingTLS" Content="{Binding Path = MessagingTLSContent}" HorizontalAlignment="Left" Margin="254,194,0,0" VerticalAlignment="Top" Width="65" Click="messagingTLS_Click" Height="27"/>

        </Grid>
        <Grid x:Name="DeviceServiceSettingsGrid" Visibility="{Binding Path=IsDeviceServiceSettingsGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Grid.Column="1" HorizontalAlignment="Left" Height="481" Margin="4,0,0,0" VerticalAlignment="Top" Width="336" Grid.ColumnSpan="3">
            <Label x:Name="deviceServiceSettingsLabel" Content="Settings - Device Services" HorizontalAlignment="Left" Margin="103,13,0,0" VerticalAlignment="Top" Width="162" FontSize="13"/>
            <Button x:Name="deviceServiceSettingsBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,16,0,0" VerticalAlignment="Top" Width="49" RenderTransformOrigin="0.5,0.5" Click="deviceServiceSettingsBackBtn_Click" Height="22" FontSize="13"/>
            <Label x:Name="acsUrlLabel" Content="URL" HorizontalAlignment="Left" Margin="10,85,0,0" VerticalAlignment="Top" Width="50" FontSize="13"/>
            <Label x:Name="acsPortLabel" Content="Port" HorizontalAlignment="Left" Margin="10,140,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.231" Width="50" FontSize="13"/>
            <Label x:Name="acsSecureLabel" Content="Secure" HorizontalAlignment="Left" Margin="10,192,0,0" VerticalAlignment="Top" Width="63" FontSize="13"/>
            <Label x:Name="acsUserNameLabel" Content="Username" HorizontalAlignment="Left" Margin="10,252,0,0" VerticalAlignment="Top" Width="76" FontSize="13"/>
            <Label x:Name="acsPasswordLabel" Content="Password" HorizontalAlignment="Left" Margin="10,308,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.816,-0.192" Width="63" FontSize="13"/>
            <Label x:Name="acsStatusLabel" Content="Status:" HorizontalAlignment="Left" Margin="88,356,0,0" VerticalAlignment="Top" FontSize="13"/>
            <Label x:Name="acsStatus" Content="{Binding Path= AcsStatusContent}" HorizontalAlignment="Left" Margin="157,356,0,0" VerticalAlignment="Top" Width="120" FontSize="13"/>
            <PasswordBox x:Name="acsPassword" HorizontalAlignment="Left" Margin="121,308,0,0" VerticalAlignment="Top" Width="198" RenderTransformOrigin="0.362,0.556" Height="27" FontSize="13"/>
            <TextBox x:Name="acsUsername" Text="{Binding Path=AcsUsernameText}" HorizontalAlignment="Left" Height="27" Margin="121,252,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198" FontSize="13"/>
            <Button x:Name="acsIsSecure" Content="{Binding Path=AcsIsSecureContent}"  HorizontalAlignment="Left" Margin="254,192,0,0" VerticalAlignment="Top" Width="65" Click="acsIsSecure_Click" Height="27" FontSize="13"/>
            <TextBox x:Name="acsPort" Text="{Binding Path=AcsPortText}" HorizontalAlignment="Left" Height="27" Margin="121,140,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198" FontSize="13"/>
            <TextBox x:Name="acsUrl" Text="{Binding Path=AcsUrlText}" HorizontalAlignment="Left" Height="27" Margin="121,85,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198" FontSize="13"/>
            <Button x:Name="acsApply" Content="Apply" HorizontalAlignment="Left" Margin="121,408,0,0" VerticalAlignment="Top" Width="110" Click="acsApply_Click" Height="27" FontSize="13"/>

        </Grid>
        <Grid Name="CallLogGrid" Visibility="{Binding Path=IsCallLogGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Left" Height="481" VerticalAlignment="Top" Width="340" Grid.Column="1" Grid.ColumnSpan="3">
            <Label x:Name="callLogsLabel" Content="Call Logs" HorizontalAlignment="Left" Margin="119,10,0,0" VerticalAlignment="Top" RenderTransformOrigin="1.008,-0.396" Width="104" FontSize="13"/>
            <Button x:Name="callLogsBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" Click="callLogsBackBtn_Click" FontSize="13" Height="22"/>
            <ListView x:Name="callLogsList" HorizontalAlignment="Left" Height="420" Margin="10,51,0,0" VerticalAlignment="Top" Width="320">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Header="Time" Width="100" DisplayMemberBinding="{Binding time}" />
                        <GridViewColumn Header="Action" Width="70" DisplayMemberBinding="{Binding action}" />
                        <GridViewColumn Header="Name" Width="100" DisplayMemberBinding="{Binding name}" />
                        <GridViewColumn Header="Number" Width="70" DisplayMemberBinding="{Binding number}" />
                        <GridViewColumn Header="Duration" Width="60" DisplayMemberBinding="{Binding duration}" />
                    </GridView>
                </ListView.View>
            </ListView>
        </Grid>

        <Grid Name="ContactsGrid" Visibility="{Binding Path=IsContactsGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Left" Height="481" VerticalAlignment="Top" Width="340" Grid.ColumnSpan="4">
            <Label x:Name="contactServiceLabel" Content="Contacts Service" HorizontalAlignment="Left" Margin="103,13,0,0" VerticalAlignment="Top" Width="114" FontSize="13" RenderTransformOrigin="0.491,1.111"/>
            <Button x:Name="contactsServiceBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" Click="contactsServiceBackBtn_Click" FontSize="13" Height="22"/>
            <ListView x:Name="contactList" PreviewMouseLeftButtonUp="ContactView_Click" HorizontalAlignment="Left" Height="422" Margin="10,59,0,0" VerticalAlignment="Top" Width="320">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Header="" Width="30" >
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <Image  Source="{Binding presence}" />
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn Header="Contact Name" Width="250" DisplayMemberBinding="{Binding name}" />
                    </GridView>
                </ListView.View>
            </ListView>
            <Button x:Name="addContactBtn" Content="Add" HorizontalAlignment="Left" Margin="287,13,0,0" VerticalAlignment="Top" Width="43" Click="addContactBtn_Click" RenderTransformOrigin="0.395,0.4" Height="27"/>
            <Button x:Name="searchBtn" Content="" HorizontalAlignment="Left" Margin="238,13,0,0" VerticalAlignment="Top" Width="43" Click="searchBtn_Click" Height="27">
                <Button.Background>
                    <ImageBrush ImageSource="Resources/Images/Search.jpg"/>
                </Button.Background>
            </Button>
        </Grid>
        <Grid Name="ViewContactGrid" Visibility="{Binding Path=IsViewContactGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Grid.Column="1" HorizontalAlignment="Left" Height="481" VerticalAlignment="Top" Width="340" Grid.ColumnSpan="3">
            <Label x:Name="firstNameLabel" Content="First Name" HorizontalAlignment="Left" Margin="10,84,0,0" VerticalAlignment="Top" Width="85" FontSize="13"/>
            <Label x:Name="lastNameLabel" Content="Last Name" HorizontalAlignment="Left" Margin="11,132,0,0" VerticalAlignment="Top" Width="81" FontSize="13"/>
            <Label x:Name="numberLabel" Content="Work Number" HorizontalAlignment="Left" Margin="11,183,0,0" VerticalAlignment="Top" Width="98" FontSize="13"/>
            <Button x:Name="editContactBtn" Visibility="{Binding Path=IsEditContactBtnVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Content="Edit" HorizontalAlignment="Left" Margin="276,15,0,0" VerticalAlignment="Top" Width="43" Click="editContactBtn_Click" FontSize="13" Height="27"/>
            <Button x:Name="updateContactBtn" Visibility="{Binding Path=IsUpdateContactBtnVisible, Converter={StaticResource BooleanToVisibilityConverter}}"  Content="Update" HorizontalAlignment="Left" Margin="11,322,0,0" VerticalAlignment="Top" Width="55" Click="updateContactBtn_Click" FontSize="13" Height="27"/>
            <TextBox x:Name="firstName" IsReadOnly="{Binding Path = FirstNameIsReadOnly}" Text="{Binding Path=FirstNameText}" HorizontalAlignment="Left" Height="27" Margin="121,85,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198"/>
            <TextBox x:Name="lastName" IsReadOnly="{Binding Path = LastNameIsReadOnly}" Text="{Binding Path=LastNameText}" HorizontalAlignment="Left" Height="27" Margin="121,132,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198"/>
            <TextBox x:Name="number" IsReadOnly="{Binding Path = NumberIsReadOnly}" Text="{Binding Path=NumberText}" HorizontalAlignment="Left" Height="27" Margin="121,183,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198" RenderTransformOrigin="0.1,0.174"/>
            <Button x:Name="contactDetailsBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" Click="contactDetailsBackBtn_Click" FontSize="13" Height="22"/>
            <Label x:Name="contactDetailsLabel" Content="Contact Details" HorizontalAlignment="Left" Margin="112,10,0,0" VerticalAlignment="Top" Width="102" FontSize="13"/>
            <Button x:Name="addNewContactBtn" Visibility="{Binding Path=IsaddNewContactBtnVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Content="SAVE" HorizontalAlignment="Left" Margin="274,17,0,0" VerticalAlignment="Top" Width="46" Click="addNewContactBtn_Click" Height="27" FontSize="13"/>
            <Label x:Name="emailLabel" Content="Work Email" HorizontalAlignment="Left" Margin="10,232,0,0" VerticalAlignment="Top" Width="95" FontSize="13"/>
            <TextBox x:Name="email" IsReadOnly="{Binding Path = EmailIsReadOnly}" Text="{Binding Path=EmailText}" HorizontalAlignment="Left" Height="27" Margin="121,232,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="198"/>
            <Button x:Name="deleteContactBtn" Visibility="{Binding Path=IsDeleteContactBtnVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Content="Delete" HorizontalAlignment="Left" Margin="264,322,0,0" VerticalAlignment="Top" Width="55" Click="deleteContactBtn_Click" Height="27" FontSize="13"/>
        </Grid>
        <Grid Name="ContactSearchGrid" Visibility="{Binding Path=IsContactSearchGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Grid.ColumnSpan="4" HorizontalAlignment="Left" Height="471" VerticalAlignment="Top" Width="340">
            <Label x:Name="contactSearchLabel" Content="Search Contact" HorizontalAlignment="Left" Margin="116,10,0,0" VerticalAlignment="Top" Width="114" FontSize="13"/>
            <Button x:Name="contactSearchBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" FontSize="13" Click="contactSearchBackBtn_Click" Height="22"/>
            <Button x:Name="searchContactBtn" Content="Search" HorizontalAlignment="Left" Margin="256,44,0,0" VerticalAlignment="Top" Width="68" Click="searchContactBtn_Click" FontSize="13" Height="27"/>
            <TextBox x:Name="contactToSearch" HorizontalAlignment="Left" Height="27" Margin="10,44,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="150" FontSize="13"/>
            <ListView x:Name="contactSearchList" HorizontalAlignment="Left" Height="395" Margin="10,76,0,0" VerticalAlignment="Top" Width="320">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Header="" Width="30" >
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <Image  Source="{Binding presence}" />
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn Header="Search results" Width="260" DisplayMemberBinding="{Binding contactName}" />
                    </GridView>
                </ListView.View>
            </ListView>
            <Label x:Name="searchingContactLabel" Content="{Binding Path=SearchingContactLabelContent}" HorizontalAlignment="Left" Margin="165,44,0,0" VerticalAlignment="Top" Width="86" Height="27"/>
        </Grid>
        <Grid Name="CallServiceGrid" Visibility="{Binding Path=IsCallServiceGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Left" Height="481" VerticalAlignment="Top" Width="340" Grid.ColumnSpan="4">
            <Label x:Name="callServiceLabel" Content="Call Service" HorizontalAlignment="Left" Margin="121,15,0,0" VerticalAlignment="Top" Width="115" FontSize="13"/>
            <Button x:Name="callServiceBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" Click="callServiceBackBtn_Click" FontSize="13" Height="22"/>
            <Label x:Name="numberToCallLabel" Content="Number to Call" HorizontalAlignment="Left" Margin="10,85,0,0" VerticalAlignment="Top" Width="103" FontSize="13"/>
            <TextBox x:Name="numberToCall" HorizontalAlignment="Left" Height="27" Margin="143,85,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="178" FontSize="13"/>
            <Button x:Name="audioCallBtn" Content="Make Audio Call" HorizontalAlignment="Left" Margin="10,150,0,0" VerticalAlignment="Top" Width="111" Click="audioCallBtn_Click" FontSize="13" Height="27"/>
            <Button x:Name="videoCallBtn" Content="Make Video Call" HorizontalAlignment="Left" Margin="205,150,0,0" VerticalAlignment="Top" Width="116" Click="videoCallBtn_Click" FontSize="13" Height="27"/>
            <Label x:Name="sacLabel" Content="Send All Calls" HorizontalAlignment="Left" Margin="10,209,0,0" VerticalAlignment="Top" Width="111" RenderTransformOrigin="-1.027,1.308" FontSize="13"/>
            <Button x:Name="sendAllCallsBtn" IsEnabled="{Binding SendAllCallsBtnEnabled}" Content="{Binding Path = SendAllCallsBtnContent}" HorizontalAlignment="Left" Margin="269,209,0,0" VerticalAlignment="Top" Width="52" Click="sendAllCallsBtn_Click" FontSize="13" Height="27"/>
        </Grid>

        <Grid Name="ActiveCallGrid" Visibility="{Binding Path=IsActiveCallGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Left" Height="481" VerticalAlignment="Top" Width="340" Grid.ColumnSpan="4">
            <Label x:Name="activeCallLabel" Content="Active Call" HorizontalAlignment="Left" Margin="114,11,0,0" VerticalAlignment="Top" Width="105" FontSize="13"/>
            <Label x:Name="callDurationLabel" Content="Call Duration:" HorizontalAlignment="Left" Margin="10,39,0,0" VerticalAlignment="Top" Width="89" FontSize="13"/>
            <Label x:Name="callDuration" Content="{Binding Path=CallDurationContent}" HorizontalAlignment="Left" Margin="108,39,0,0" VerticalAlignment="Top" Width="222" FontSize="13"/>
            <Label x:Name="callStateLabel" Content="Call State:" HorizontalAlignment="Left" Margin="10,69,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.658,0.077" Width="81" FontSize="13"/>
            <Label x:Name="callState" Content="{Binding Path=CallStateContent}" HorizontalAlignment="Left" Margin="109,69,0,0" VerticalAlignment="Top" Width="221" FontSize="13"/>
            <Label x:Name="muteLabel" Content="Mute" HorizontalAlignment="Left" Margin="10,101,0,0" VerticalAlignment="Top" Width="81" FontSize="13"/>
            <Button x:Name="muteBtn" Content="{Binding Path=MuteBtnContent}" HorizontalAlignment="Left" Margin="114,103,0,0" VerticalAlignment="Top" Width="43" Click="muteBtn_Click" FontSize="13" RenderTransformOrigin="1.558,0.476" Height="25"/>
            <Label x:Name="dtmfLabel" Content="DTMF" HorizontalAlignment="Left" Margin="10,135,0,0" VerticalAlignment="Top" Width="56" FontSize="13" Height="26"/>
            <TextBox x:Name="dtmfString" HorizontalAlignment="Left" Height="27" Margin="114,134,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="216" FontSize="13" TextChanged="dtmfStringTextChanged" PreviewTextInput="dtmfStringInputValidation"/>
            <Button x:Name="endCallBtn" Content="End" HorizontalAlignment="Left" Margin="12,437,0,0" VerticalAlignment="Top" Width="318" Click="endCallBtn_Click" FontSize="13" Height="27"/>
            <Button x:Name="conferenceControlsBtn" Visibility="{Binding Path=IsConferenceControlsBtnVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Content="Conference Controls" HorizontalAlignment="Left" Margin="212,166,0,0" VerticalAlignment="Top" Width="112" Click="conferenceControlsBtn_Click" RenderTransformOrigin="0.438,2.1"/>
            <Grid Name="VideoGrid" Visibility="{Binding Path=IsVideoGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}"  HorizontalAlignment="Left" Height="143" Margin="10,192,0,0" VerticalAlignment="Top" Width="320">
                <Grid Name="remoteVideoGrid" HorizontalAlignment="Left" Height="133" Margin="10,10,0,0" VerticalAlignment="Top" Width="182">
                    <Image x:Name="RemoteVideo" Stretch="Uniform" HorizontalAlignment="Left" Height="99" Margin="10,24,0,0" VerticalAlignment="Top" Width="162">
                        <Image.Source>
                            <AvayaMedia:VideoRenderer2/>
                        </Image.Source>
                    </Image>
                </Grid>
                <Grid Name="localVideoGrid" HorizontalAlignment="Left" Height="111" Margin="183,32,0,0" VerticalAlignment="Top" Width="137">
                    <Image Name="LocalVideo"  Visibility="Visible" Margin="10,39,10,10">
                        <Image.Source>
                            <AvayaMedia:VideoRenderer2/>
                        </Image.Source>
                    </Image>
                    <Label x:Name="localVIdeolabel" Content="Local VIdeo" HorizontalAlignment="Left" Margin="38,6,0,0" VerticalAlignment="Top" Width="78" FontSize="13"/>
                </Grid>
                <Label x:Name="remoteVideolabel" Content="Remote Video" HorizontalAlignment="Left" Margin="53,9,0,0" VerticalAlignment="Top" Width="92" FontSize="13"/>
            </Grid>
            <ListView x:Name="participantList" HorizontalAlignment="Left" Height="89" Margin="10,343,0,0" VerticalAlignment="Top" Width="320">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Header="Participants" Width="280" DisplayMemberBinding="{Binding participantName}" />
                    </GridView>
                </ListView.View>
            </ListView>
            <Button x:Name="desktopSharingBtn" Visibility="{Binding Path=IsDesktopSharingBtnVisible, Converter={StaticResource BooleanToVisibilityConverter}}"  Content="{Binding Path = DesktopSharingBtnContent}" HorizontalAlignment="Left" Margin="228,103,0,0" VerticalAlignment="Top" Width="96" Click="desktopSharingBtn_Click"/>
            <Button x:Name="collaborationBtn" Visibility="{Binding Path=IsCollaborationBtnVisible, Converter={StaticResource BooleanToVisibilityConverter}}"  Content="Collaboration" HorizontalAlignment="Left" Margin="212,192,0,0" VerticalAlignment="Top" Width="112" Click="collaborationBtn_Click"/>
        </Grid>
        <Grid x:Name="ConversationListGrid" Visibility="{Binding Path=IsConversationListGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Grid.ColumnSpan="4" HorizontalAlignment="Left" Height="481" VerticalAlignment="Top" Width="340">
            <ListView x:Name="conversationList" PreviewMouseLeftButtonUp="ConversationView_Click" HorizontalAlignment="Left" Height="391" Margin="10,51,0,0" VerticalAlignment="Top" Width="320">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Width="310" DisplayMemberBinding="{Binding participantsInConversation}"/>
                    </GridView>
                </ListView.View>
            </ListView>
            <Button x:Name="conversationListBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" Click="conversationListBackBtn_Click" Height="22" FontSize="13"/>
            <Label x:Name="conversationListLabel" Content="Conversation List" HorizontalAlignment="Left" Margin="107,12,0,0" VerticalAlignment="Top" Width="122" FontSize="13"/>
            <Button x:Name="newChatBtn" Content="New Chat" HorizontalAlignment="Left" Margin="125,447,0,0" VerticalAlignment="Top" Width="65" Click="newChatBtn_Click" FontSize="13" Height="26"/>
        </Grid>
        <Grid Name="CreateNewChatGrid" Visibility="{Binding Path=IsCreateNewChatGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Grid.Column="1" HorizontalAlignment="Left" Height="481" VerticalAlignment="Top" Width="340" Grid.ColumnSpan="3">
            <Label x:Name="CreateNewChatlabel" Content="Create New Chat" HorizontalAlignment="Left" Margin="101,10,0,0" VerticalAlignment="Top" Width="132" FontSize="13"/>
            <Button x:Name="createNewChatBtn" Content="Create" HorizontalAlignment="Left" Margin="264,83,0,0" VerticalAlignment="Top" Width="66" Height="27" FontSize="13" Click="createNewChatBtn_Click"/>
            <TextBox x:Name="addressToChatTxt" HorizontalAlignment="Left" Height="27" Margin="10,83,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="223" FontSize="13"/>
            <Button x:Name="createNewChatBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" RenderTransformOrigin="0.547,0.9" Click="createNewChatBackBtn_Click" Height="22" FontSize="13"/>
        </Grid>
        <Grid Name="ViewConversationGrid" Visibility="{Binding Path=IsViewConversationGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Grid.Column="1" HorizontalAlignment="Left" Height="481" VerticalAlignment="Top" Width="340" Grid.ColumnSpan="3">
            <TextBox x:Name="messageText" HorizontalAlignment="Left" Height="50" Margin="10,421,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="242" FontSize="13"/>
            <Button x:Name="sendMessageBtn" Content="Send" HorizontalAlignment="Left" Margin="261,421,0,0" VerticalAlignment="Top" Width="69" Height="22" Click="sendMessageBtn_Click" FontSize="13" RenderTransformOrigin="0.667,0.455"/>
            <Button x:Name="ViewConversationBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" Height="22" FontSize="13" Click="ViewConversationBackBtn_Click"/>
            <ListView x:Name="messageList" HorizontalAlignment="Left" Height="331" Margin="10,53,0,0" VerticalAlignment="Top" Width="320">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Width="300" DisplayMemberBinding="{Binding Message}" />
                    </GridView>
                </ListView.View>
            </ListView>
            <Button x:Name="leaveConversationBtn" Content="Leave" HorizontalAlignment="Left" Margin="267,10,0,0" VerticalAlignment="Top" Width="63" Click="leaveConversationBtn_Click" FontSize="13" Height="27"/>
            <Button x:Name="attachFile" Visibility="Visible" Content="Attach File" HorizontalAlignment="Left" Margin="261,449,0,0" VerticalAlignment="Top" Width="69" RenderTransformOrigin="0.5,0.5" FontSize="13" Click="attachFile_Click" Height="22"/>
            <Label x:Name="conversationWithLabel" Content="" HorizontalAlignment="Left" Margin="62,10,0,0" VerticalAlignment="Top" Width="200" FontSize="13"/>
            <Label x:Name="composingParticipant" Content="" HorizontalAlignment="Left" Margin="10,389,0,0" VerticalAlignment="Top" Width="193" FontSize="13"/>
            <Button x:Name="attachmentListBtn" Content="Media" HorizontalAlignment="Left" Margin="261,394,0,0" VerticalAlignment="Top" Width="69" FontSize="13" Click="attachmentListBtn_Click" Height="22"/>
        </Grid>
        <Grid Name="AttachmentListGrid" Visibility="{Binding Path=IsAttachmentListGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Grid.Column="1" HorizontalAlignment="Left" Height="481" VerticalAlignment="Top" Width="340" Grid.ColumnSpan="3">
            <ListView x:Name="attachmentList" PreviewMouseLeftButtonUp="Attachment_Click" HorizontalAlignment="Left" Height="424" Margin="10,47,0,0" VerticalAlignment="Top" Width="320">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Width="160" DisplayMemberBinding="{Binding FileName}"/>
                        <GridViewColumn Width="120" DisplayMemberBinding="{Binding DownloadStatus}"/>
                    </GridView>
                </ListView.View>
            </ListView>
            <Button x:Name="attachmentListBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" Click="attachmentListBackBtn_Click" FontSize="13" Height="22"/>
            <Label x:Name="attachmentListLabel" Content="Conversation Media" HorizontalAlignment="Left" Margin="110,11,0,0" VerticalAlignment="Top" Width="114" Height="27" FontSize="13"/>
        </Grid>
        <Grid Name="AboutScreenGrid" Visibility="{Binding Path=IsAboutScreenGridVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Grid.ColumnSpan="4" HorizontalAlignment="Left" Height="481" VerticalAlignment="Top" Width="340">
            <Label x:Name="aboutScreenLabel" Content="Communications Package Sample App" HorizontalAlignment="Left" Margin="10,81,0,0" VerticalAlignment="Top" Width="241" FontSize="13"/>
            <Label x:Name="appVersionLabel" Content="Version:" HorizontalAlignment="Left" Margin="10,113,0,0" VerticalAlignment="Top" Width="60" FontSize="13"/>
            <Label x:Name="appBuildDateLabel" Content="Build date:" HorizontalAlignment="Left" Margin="10,145,0,0" VerticalAlignment="Top" Width="75" FontSize="13"/>
            <Label x:Name="avayaClientServicesLabel" Content="Client SDK" HorizontalAlignment="Left" Margin="10,206,0,0" VerticalAlignment="Top" Width="241" FontSize="13"/>
            <Label x:Name="sdkVersionLabel" Content="Version:" HorizontalAlignment="Left" Margin="10,238,0,0" VerticalAlignment="Top" Width="60" FontSize="13"/>
            <Label x:Name="appVersion" Content="appVersion" HorizontalAlignment="Left" Margin="117,113,0,0" VerticalAlignment="Top" Width="168" FontSize="13"/>
            <Label x:Name="appBuildDate" Content="appBuildDate" HorizontalAlignment="Left" Margin="117,145,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.079,0.385" Width="168" FontSize="13"/>
            <Label x:Name="sdkVersion" Content="sdkVersion" HorizontalAlignment="Left" Margin="117,238,0,0" VerticalAlignment="Top" Width="168" FontSize="13"/>
            <Button x:Name="aboutBackBtn" Content="Back" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="49" Click="aboutBackBtn_Click" Height="22"/>
            <Label x:Name="aboutLabel" Content="About" HorizontalAlignment="Left" Margin="129,10,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.132,0.154" Width="86" FontSize="13"/>
        </Grid>
    </Grid>
</Window>