SendEmailButton Style and Template
This topic describes the style and template for the SendEmailButton 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 SendEmailButton control.
SendEmailButton Parts
The following table lists the named parts for the SendEmailButton control.
Part |
Type |
Description |
---|---|---|
CommandControl |
Starts Microsoft Outlook and initiates the desired action with that contact. |
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 SendEmailButton control.
<Style x:Key="SendEmailButtonStyle1" TargetType="controls:SendEmailButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:SendEmailButton">
<Microsoft_Lync_Controls_Internal:HelpTextButton AutomationProperties.AutomationId="StartEmailButton" Background="{TemplateBinding Background}" Microsoft_Lync_Controls_Internal_Framework_Commands:Command.Click="{Binding Model.SendEmailCommand, RelativeSource={RelativeSource TemplatedParent}}" Microsoft_Lync_Controls_Internal_Framework_Commands:Command.CommandParameter="{TemplateBinding Subject}" Padding="{TemplateBinding Padding}" Style="{StaticResource GlobalIconButtonStyle}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding Model.PresenceItems.PrimaryEmail, Converter={StaticResource EmailAddressToStartEmailTooltipConverter}, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource DefaultToolTipStyle}"/>
</ToolTipService.ToolTip>
<Binding Path="Content" RelativeSource="{RelativeSource TemplatedParent}">
<Binding.TargetNullValue>
<ContentControl Style="{StaticResource IconStyle.StartEmail}"/>
</Binding.TargetNullValue>
</Binding>
</Microsoft_Lync_Controls_Internal:HelpTextButton>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>