StartInstantMessagingButton style and template
Learn about the style and template for the StartInstantMessagingButton control. You can modify the default ControlTemplate to give the control a unique appearance. For more information, see the other topics in the Customizing Lync Controls section.
Applies to: Lync 2013 | Lync Server 2013
There are no states or Style properties for the StartInstantMessagingButton control.
StartInstantMessagingButton parts
The following table lists the named parts for the StartInstantMessagingButton control.
Part |
Type |
Description |
---|---|---|
CommandControl |
Opens a Microsoft Lync 2010 conversation window and start an instant messaging 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 StartInstantMessagingButton control.
<Style x:Key="StartInstantMessagingButtonStyle1" TargetType="{x:Type controls:StartInstantMessagingButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:StartInstantMessagingButton}">
<Microsoft_Lync_Controls_Internal:HelpTextButton x:Name="PART_CommandControl" AutomationProperties.AutomationId="StartInstantMessagingButton" IsEnabled="False" Microsoft_Lync_Controls_Internal_Framework_Commands:Command.Click="{Binding Model.StartInstantMessagingCommand, RelativeSource={RelativeSource TemplatedParent}}" Microsoft_Lync_Controls_Internal_Framework_Commands:Command.CommandParameter="{Binding ContextualInformation, Converter={StaticResource ConversationContextToContextModelConverter}, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource GlobalIconButtonStyle}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
<ToolTipService.ToolTip>
<ToolTip Style="{StaticResource DefaultToolTipStyle}" Content="{Binding Model.PresenceItems.PrimaryEmail, Converter={StaticResource EmailAddressToStartInstantMessagingButtonTooltipConverter}, RelativeSource={RelativeSource TemplatedParent}}" />
</ToolTipService.ToolTip>
<Binding Path="Content" RelativeSource="{RelativeSource TemplatedParent}">
<Binding.TargetNullValue>
<ContentControl Style="{StaticResource IconStyle.StartIM}" />
</Binding.TargetNullValue>
</Binding>
</Microsoft_Lync_Controls_Internal:HelpTextButton>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>