Share via

Scf.Em Method

Creates a Simple Content Format Em element.

Namespace: Microsoft.SideShow.SimpleContentFormat
Assembly: Microsoft.SideShow (in microsoft.sideshow.dll)



Public Shared Function Em ( _
    ParamArray content As Object() _
) As ScfElement
public static ScfElement Em (
    params Object[] content
static ScfElement^ Em (
    ... array<Object^>^ content
public static ScfElement Em (
    Object[] content
public static function Em (
    ... content : Object[]
) : ScfElement


  • content
    An array of ScfElement objects that make up this element's content.

Return Value

An ScfElement object that represents a text emphasis element.


This example code shows how to emphasize text content using the Em method.

private static void SampleEm()
    // Set the gadget's GUID.
    Guid gadgetId = new Guid("{0530B726-F6D5-4a66-900E-3C7673316F3B}");

    // Add the gadget's registry subkey and values.
        false,                           // Register gadget for current user only
        gadgetId,                        // Guid for the registry subkey
        ScfSideShowGadget.ScfEndpointId, // Endpoints registry value
        "Example SideShow gadget",       // FriendlyName registry value
        null,                            // StartCommand registry value
        null,                            // Icon registry value, this gadget will use the generic gadget icon.
        false,                           // OnlineOnly registry value
        GadgetCachePolicies.KeepNewest,  // CachePolicy registry value

    // Construct a Simple Content Format SideShow gadget for the gadget's Guid.
    using (ScfSideShowGadget gadget = new ScfSideShowGadget(gadgetId))
        // Add Glance content.
           String.Format("Some glance content"));

        // Set element ids;
        int mainMenuPageId = 1;
        int page1Id = 2;
        int menuItem1Id = 3;

        // The menu page. 
        string content =
                Scf.Menu(mainMenuPageId, "Main Menu", ScfSelectAction.Target,
                    // The word "excited" will be emphasized, the rest of the Txt content will not be emphasized.
                    Scf.Txt(ScfAlign.Left, true, Color.Blue, "You should be so ", Scf.Em("excited"), " that you don't have to write your own xml."),
                    Scf.Item(menuItem1Id, "Navigate to content page.")));

        // The content page.
        string page1 = Scf.Body(
            Scf.Content(page1Id, "Page 1 Title",
                // The word "Wow!" is emphasized.
                Scf.Txt(ScfAlign.Left, true, Color.Blue, Scf.Em("Wow!"), "I expect the wow to be bold but its all up to the device.")));

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


Development Platforms

Windows Vista Home Premium, Windows Vista Business, Windows Vista Enterprise, Windows Vista Ultimate

Target Platforms

Windows Vista Home Premium, Windows Vista Business, Windows Vista Enterprise, Windows Vista Ultimate

See Also


Scf Class
Scf Members
Microsoft.SideShow.SimpleContentFormat Namespace