Re-style the ContactList control by changing property values to change the appearance of the control.

Re-Style the ContactList Control

Use the following procedure to change the appearance of the control.

To re-style a ContactList control

  1. Create a Lync Controls application using either the Microsoft Silverlight or Windows Presentation Foundation template. For more information, see the topic Walkthrough: Presence Hello World .

  2. In the XAML pane, add the XAML text to create a ContactList control. Add a style to set the Background and FontFamily properties on the control. See the following code example.

      Copy imageCopy Code
    <Grid>
    		<Grid.Resources>
    			<Style x:Key="MyContactListStyle"
    TargetType="Controls:ContactList">
    				<Setter Property="Background"
    Value="AliceBlue"/>
    				<Setter Property="FontFamily" Value="Courier
    New"/>
    			</Style>
    		</Grid.Resources>
    		<Controls:ContactList Style="{StaticResource
    MyContactListStyle}"/>
    </Grid>
    
  3. Run the project. If the property values described in the previous step are in place, see that the control background color is now blue, and the font family is now Courier New.

See Also

Other Resources