StartAudioCallButton Style and Template
This topic describes the style and template for the StartAudioCallButton 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 Style properties for the StartAudioCallButton control.
StartAudioCallButton Parts
The following table lists the named parts for the StartAudioCallButton control.
Part |
Type |
Description |
---|---|---|
CommandControl |
Opens a Microsoft Lync 2010 conversation window and starts a voice conversation. |
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 StartAudioCallButton control.
<Style x:Key="StartAudioCallButtonStyle1" TargetType="{x:Type controls:StartAudioCallButton}">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelper.PropertyBindingCollection">
<Setter.Value>
<Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelperCollection>
<Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelper Property="Content" Binding="{Binding Model.DefaultEndpoint, Converter={StaticResource EndpointTypeToControlConverter}, RelativeSource={RelativeSource Self}}" />
</Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelperCollection>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:StartAudioCallButton}">
<Microsoft_Lync_Controls_Internal:SplitButton x:Name="PART_CommandControl" AutomationProperties.AutomationId="StartAudioVideoButton" DataContext="{TemplateBinding Model}" Command="{Binding StartAudioVideoCommand}" CommandParameter="{Binding ContextualInformation, Converter={StaticResource ConversationContextToContextModelConverter}, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="False" Content="{TemplateBinding Content}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
<Microsoft_Lync_Controls_Internal:SplitButton.LeftToolTip>
<ToolTip Style="{StaticResource DefaultToolTipStyle}" Content="{Binding Model.DefaultEndpoint, Converter={StaticResource EndpointTypeToStartAudioCallButtonToolTipConverter}, RelativeSource={RelativeSource TemplatedParent}}" />
</Microsoft_Lync_Controls_Internal:SplitButton.LeftToolTip>
<Microsoft_Lync_Controls_Internal:SplitButton.RightToolTip>
<ToolTip Style="{StaticResource DefaultToolTipStyle}" Content="{Binding Resources.StartAudioCallButtonRightToolTip, Source={StaticResource ResourcesWrapper}}" />
</Microsoft_Lync_Controls_Internal:SplitButton.RightToolTip>
<Microsoft_Lync_Controls_Internal:SplitButton.DropDown>
<Microsoft_Lync_Controls_Internal:ContextMenu Style="{StaticResource ContextMenuDefaultStyle}" ItemsSource="{TemplateBinding ContextInformationModels}" ItemContainerStyle="{StaticResource ContactDropDownMenuItemStyle}" FontStyle="{TemplateBinding FontStyle}" FontSize="10.6" FontFamily="{TemplateBinding FontFamily}" FontWeight="{TemplateBinding FontWeight}" />
</Microsoft_Lync_Controls_Internal:SplitButton.DropDown>
</Microsoft_Lync_Controls_Internal:SplitButton>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>