CustomContactList Style and Template
This topic describes the style and template for the CustomContactList control. You can modify the default ControlTemplate to give the control a unique appearance. For more information, see Customizing Lync 2010 Controls.
There are no states or parts or Style properties for the CustomContactList control.
Default Style and Template
The following shows the XML namespace mapping that you have to specify when you work with styles and templates.
xmlns:controls="clr-namespace:Microsoft.Lync.Controls;assembly=Microsoft.Lync.Controls"
The following sample shows the default Windows Presentation Foundation style and template for the CustomContactList control.
<Style x:Key="CustomContactListStyle1" TargetType="{x:Type controls:CustomContactList}">
<Setter Property="SelectionMode" Value="Extended" />
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="Background" Value="{Binding DefaultControlBackgroundBrush, Source={StaticResource ControlColors}}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:CustomContactList}">
<Grid>
<Microsoft_Lync_Controls_Internal:ContactListMenu x:Name="PART_ContactListMenu" />
<Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="1">
<ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false" Template="{StaticResource ScrollViewerDefaultTemplate}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>