FontFamily.BaseUri FontFamily.BaseUri FontFamily.BaseUri FontFamily.BaseUri Property

Definición

Obtiene el identificador de recursos uniforme (URI)uniform resource identifier (URI) base que se utiliza para resolver el nombre de una familia de fuentes.Gets the base identificador de recursos uniforme (URI)uniform resource identifier (URI) that is used to resolve a font family name.

public:
 property Uri ^ BaseUri { Uri ^ get(); };
public Uri BaseUri { get; }
member this.BaseUri : Uri
Public ReadOnly Property BaseUri As Uri

Valor de propiedad

Valor de tipo Uri.A value of type Uri.

Ejemplos

En el ejemplo siguiente se muestran los resultados de la BaseUri recuperación de la FontFamily propiedad de un objeto.The following example shows the results of retrieving the BaseUri property from a FontFamily object.

// Create a new FontFamily object, using a font in the system fonts collection.
myTextBlock.FontFamily = new FontFamily("Comic Sans MS");

// The value of baseUri is null.
Uri baseUri = myTextBlock.FontFamily.BaseUri;

// Create a new FontFamily object, using an absolute URI reference.
myTextBlock.FontFamily = new FontFamily("file:///d:/MyFonts/#Pericles Light");

// The value of baseUri is null.
baseUri = myTextBlock.FontFamily.BaseUri;

// Create a new FontFamily object, using a base URI reference and a relative URI reference.
myTextBlock.FontFamily = new FontFamily(new Uri("pack://application:,,,/resources/"), "./#Pericles Light");

// The value of baseUri.AbsoluteUri is "pack://application:,,,/resources/".
baseUri = myTextBlock.FontFamily.BaseUri;
' Create a new FontFamily object, using a font in the system fonts collection.
myTextBlock.FontFamily = New FontFamily("Comic Sans MS")

' The value of baseUri is null.
Dim baseUri As Uri = myTextBlock.FontFamily.BaseUri

' Create a new FontFamily object, using an absolute URI reference.
myTextBlock.FontFamily = New FontFamily("file:///d:/MyFonts/#Pericles Light")

' The value of baseUri is null.
baseUri = myTextBlock.FontFamily.BaseUri

' Create a new FontFamily object, using a base URI reference and a relative URI reference.
myTextBlock.FontFamily = New FontFamily(New Uri("pack://application:,,,/resources/"), "./#Pericles Light")

' The value of baseUri.AbsoluteUri is "pack://application:,,,/resources/".
baseUri = myTextBlock.FontFamily.BaseUri

Comentarios

El valor devuelto null es si el nombre de la familia de fuentes no depende Identificador URIURI de una base para resolver la referencia de fuente.The return value is null if the font family name does not rely on a base Identificador URIURI for resolving the font reference. Para recuperar el nombre de la familia de fuentes que se usa FontFamily para construir el objeto Source , use la propiedad.To retrieve the font family name that is used to construct the FontFamily object, use the Source property.

Se aplica a