1
votes

I have updated my existing application which uses lync sdk assemblies to silverlight 5. from there onwards, the application does not compile gives out an error The tag 'UCTreeView' does not exist in XML namespace 'clr-namespace:Microsoft.Lync.Controls;assembly=Microsoft.Lync.Controls' I've added following references Microsoft.Lync.Controls

Microsoft.Lync.Controls.Framework

Microsoft.Lync.Model

Microsoft.Lync.Utilities

System.Windows.Controls

Following XAML gives compile errors

    <UserControl x:Class="aa.MainPage"
    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:c="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:controls="clr-namespace:Microsoft.Lync.Controls;assembly=Microsoft.Lync.Controls" 
    mc:Ignorable="d"
    xmlns:Microsoft_Lync_Controls_Internal_Converters="clr-namespace:Microsoft.Lync.Controls.Internal.Converters;assembly=Microsoft.Lync.Controls" 
    xmlns:Microsoft_Lync_Internal_Utilities_Helpers="clr-namespace:Microsoft.Lync.Internal.Utilities.Helpers;assembly=Microsoft.Lync.Utilities" 
    xmlns:Microsoft_Lync_Controls_Internal="clr-namespace:Microsoft.Lync.Controls.Internal;assembly=Microsoft.Lync.Controls" 
    xmlns:Microsoft_Lync_Controls_Internal_Framework_Commands="clr-namespace:Microsoft.Lync.Controls.Internal.Framework.Commands;assembly=Microsoft.Lync.Controls.Framework"             
    d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <Style x:Key="ContactListStyle1" TargetType="controls:ContactList">
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
            <Setter Property="Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelper.PropertyBindingCollection">
                <Setter.Value>
                    <Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelperCollection>
                        <Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelper Binding="{Binding DefaultControlBackgroundBrush, Source={StaticResource ControlColors}}" Property="Background"/>
                    </Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelperCollection>
                </Setter.Value>
            </Setter>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="UseLayoutRounding" Value="False"/>
            <Setter Property="AllowDrop" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="controls:ContactList">
                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
                            <Grid x:Name="PART_ContactListGrid" Grid.Row="0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>
                                <Grid AutomationProperties.AutomationId="PivotBar" Visibility="{Binding ShowPivotBar, Converter={StaticResource BooleanToVisibilityConverter}, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="10"/>
                                    </Grid.RowDefinitions>
                                    <Grid Height="26" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=PivotBarDivider}">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*"/>
                                        </Grid.ColumnDefinitions>
                                        <Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton AutomationProperties.AutomationId="ViewByGroupButton" Content="{Binding Resources.ContactListFilterGroup, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}" Grid.Column="0" GroupName="ViewByOptions" IsChecked="{Binding GroupViewBySetting, ConverterParameter=Groups, Converter={StaticResource EnumToBoolConverter}, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{Binding IsSignedIn, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ListFilterRadioButtonStyle}">
                                            <ToolTipService.ToolTip>
                                                <ToolTip Content="{Binding Resources.ContactListFilterGroupToolTip, Source={StaticResource ResourcesWrapper}}" Style="{StaticResource DefaultToolTipStyle}"/>
                                            </ToolTipService.ToolTip>
                                        </Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton>
                                        <Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton AutomationProperties.AutomationId="ViewByStatusButton" Content="{Binding Resources.ContactListFilterStatus, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}" Grid.Column="1" GroupName="ViewByOptions" IsChecked="{Binding GroupViewBySetting, ConverterParameter=Status, Converter={StaticResource EnumToBoolConverter}, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{Binding IsSignedIn, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ListFilterRadioButtonStyle}">
                                            <ToolTipService.ToolTip>
                                                <ToolTip Content="{Binding Resources.ContactListFilterStatusToolTip, Source={StaticResource ResourcesWrapper}}" Style="{StaticResource DefaultToolTipStyle}"/>
                                            </ToolTipService.ToolTip>
                                        </Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton>
                                        <Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton AutomationProperties.AutomationId="ViewByRelationshipButton" Content="{Binding Resources.ContactListFilterRelationship, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}" Grid.Column="2" GroupName="ViewByOptions" IsChecked="{Binding GroupViewBySetting, ConverterParameter=Relationship, Converter={StaticResource EnumToBoolConverter}, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{Binding IsSignedIn, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ListFilterRadioButtonStyle}">
                                            <ToolTipService.ToolTip>
                                                <ToolTip Content="{Binding Resources.ContactListFilterRelationshipToolTip, Source={StaticResource ResourcesWrapper}}" Style="{StaticResource DefaultToolTipStyle}"/>
                                            </ToolTipService.ToolTip>
                                        </Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton>
                                        <Microsoft_Lync_Controls_Internal:SplitButton x:Name="PART_ViewLayoutMenu" AutomationProperties.AutomationId="ViewLayoutMenu" Grid.Column="3" HorizontalAlignment="Right" Height="22" IsEnabled="{Binding IsSignedIn, RelativeSource={RelativeSource TemplatedParent}}" Padding="2,0,2,0" Style="{StaticResource SplitButtonControlTertiaryStyle}" VerticalAlignment="Center">
                                            <Microsoft_Lync_Controls_Internal:SplitButton.DropDown>
                                                <Microsoft_Lync_Controls_Internal:ContextMenu>
                                                    <Microsoft_Lync_Controls_Internal:RadioMenuItem x:Name="PART_OneLineMenuItem" AutomationProperties.AutomationId="OneLineRadioButton" GroupName="LineViewGroup" Header="{Binding Resources.ContactListViewOneLine, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}">
                                                        <Microsoft_Lync_Controls_Internal:RadioMenuItem.Icon>
                                                            <ContentControl Style="{StaticResource IconStyle.OneLineView}"/>
                                                        </Microsoft_Lync_Controls_Internal:RadioMenuItem.Icon>
                                                    </Microsoft_Lync_Controls_Internal:RadioMenuItem>
                                                    <Microsoft_Lync_Controls_Internal:RadioMenuItem x:Name="PART_TwoLinesMenuItem" AutomationProperties.AutomationId="TwoLinesRadioButton" GroupName="LineViewGroup" Header="{Binding Resources.ContactListViewTwoLine, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}">
                                                        <Microsoft_Lync_Controls_Internal:RadioMenuItem.Icon>
                                                            <ContentControl Margin="0,1,0,0" Style="{StaticResource IconStyle.TwoLineView}"/>
                                                        </Microsoft_Lync_Controls_Internal:RadioMenuItem.Icon>
                                                    </Microsoft_Lync_Controls_Internal:RadioMenuItem>
                                                    <Microsoft_Lync_Controls_Internal:MenuItem Header="{Binding Resources.ContactListViewShowFriendlyName, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}" IsCheckable="True" IsChecked="{Binding ShowFriendlyName, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                                                    <Microsoft_Lync_Controls_Internal:MenuItem IsTabStop="False" IsEnabled="False" Style="{StaticResource MenuItemSeparatorStyle}"/>
                                                    <Microsoft_Lync_Controls_Internal:RadioMenuItem x:Name="PART_SortByDisplayNameMenuItem" GroupName="SortByGroup" Header="{Binding Resources.ContactListViewDisplayName, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}"/>
                                                    <Microsoft_Lync_Controls_Internal:RadioMenuItem x:Name="PART_SortByAvailabilityMenuItem" GroupName="SortByGroup" Header="{Binding Resources.ContactListViewAvailability, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}"/>
                                                    <Microsoft_Lync_Controls_Internal:MenuItem IsTabStop="False" IsEnabled="False" Style="{StaticResource MenuItemSeparatorStyle}"/>
                                                    <Microsoft_Lync_Controls_Internal:MenuItem Header="{Binding Resources.ContactListViewShowFrequentContacts, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}" IsCheckable="True" IsChecked="{Binding ShowFrequentContacts, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                                                </Microsoft_Lync_Controls_Internal:ContextMenu>
                                            </Microsoft_Lync_Controls_Internal:SplitButton.DropDown>
                                            <Microsoft_Lync_Controls_Internal:SplitButton.LeftToolTip>
                                                <ToolTip Content="{Binding Resources.ToolTipContactListLayoutMenuLeft, Source={StaticResource ResourcesWrapper}}" Style="{StaticResource DefaultToolTipStyle}"/>
                                            </Microsoft_Lync_Controls_Internal:SplitButton.LeftToolTip>
                                            <Microsoft_Lync_Controls_Internal:SplitButton.RightToolTip>
                                                <ToolTip Content="{Binding Resources.ToolTipContactListLayoutMenuRight, Source={StaticResource ResourcesWrapper}}" Style="{StaticResource DefaultToolTipStyle}"/>
                                            </Microsoft_Lync_Controls_Internal:SplitButton.RightToolTip>
                                            <Grid>
                                                <ContentControl Style="{StaticResource IconStyle.OneLineView}" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=PART_OneLineMenuItem, FallbackValue=Collapsed, Mode=OneWay}"/>
                                                <ContentControl Style="{StaticResource IconStyle.TwoLineView}" Visibility="{Binding IsChecked, Converter={StaticResource NotBooleanToVisibilityConverter}, ElementName=PART_OneLineMenuItem, Mode=OneWay}"/>
                                            </Grid>
                                        </Microsoft_Lync_Controls_Internal:SplitButton>
                                    </Grid>
                                    <ToggleButton x:Name="PivotBarDivider" AutomationProperties.AutomationId="PivotBarDivider" Height="10" IsChecked="True" AutomationProperties.Name="Pivot bar divider" Grid.Row="1" Style="{StaticResource ToggleButtonPivotDividerStyle}"/>
                                </Grid>
                                <controls:UCTreeView x:Name="PART_TreeControl" ContextualInformation="{TemplateBinding ContextualInformation}" ContactLayoutView="{TemplateBinding ContactLayoutView}" GroupViewBySetting="{TemplateBinding GroupViewBySetting}" HorizontalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" ItemsSource="{TemplateBinding Contacts}" IsEnabled="{TemplateBinding IsSignedIn}" Grid.Row="1" ShowFriendlyName="{TemplateBinding ShowFriendlyName}" ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" Style="{StaticResource UCTreeViewStyle1}"/>
                            </Grid>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White">
    </Grid>
</UserControl>
1
Have you got a question?jv42
More seriously, it seems that you need an updated Lync SDK from Microsoft. Maybe open an issue on Connect connect.microsoft.com/VisualStudiojv42

1 Answers

1
votes

I've bad news for you. Lync 2010 needs and require Silverlight 4 SDK, it was created for that version. For example, if you try install Lync 2010 AFTER Silverlight 5 Tools, you need to do a downgrade. Otherwise you will find bugs, and bugs, and conflicts, and conflicts, for ever.

Try with this thread: http://social.msdn.microsoft.com/Forums/en-US/communicationsserversdk/thread/85f3990a-de73-4ed2-b6c2-f515a9a8fec5