DataGridTableStyle.ResetSelectionForeColor Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Restablece el valor predeterminado de la propiedad SelectionForeColor.
public:
void ResetSelectionForeColor();
public void ResetSelectionForeColor ();
member this.ResetSelectionForeColor : unit -> unit
Public Sub ResetSelectionForeColor ()
Ejemplos
En el ejemplo de código siguiente se muestra el uso de este miembro.
// String variable used to show message.
String^ myString = "Fore color changed from: ";
// Store current foreground color of selected cells.
Color myCurrentColor = customersStyle->SelectionForeColor;
myString = String::Concat( myString, myCurrentColor );
// Reset selection fore color to default.
customersStyle->ResetSelectionForeColor();
myString = String::Concat( myString, " to " );
myString = String::Concat( myString, customersStyle->SelectionForeColor );
// Show information about changes in color setting.
MessageBox::Show( myString, "Selection fore color information" );
// String variable used to show message.
string myString = "Fore color changed from: ";
// Store current foreground color of selected cells.
Color myCurrentColor = customersStyle.SelectionForeColor;
myString += myCurrentColor.ToString();
// Reset selection fore color to default.
customersStyle.ResetSelectionForeColor();
myString += " to ";
myString += customersStyle.SelectionForeColor.ToString();
// Show information about changes in color setting.
MessageBox.Show(myString, "Selection fore color information");
' String variable used to show message.
Dim myString As String = "Fore color changed from: "
' Store current foreground color of selected cells.
Dim myCurrentColor As Color = customersStyle.SelectionForeColor
myString += myCurrentColor.ToString()
' Reset selection fore color to default.
customersStyle.ResetSelectionForeColor()
myString += " to "
myString += customersStyle.SelectionForeColor.ToString()
' Show information about changes in color setting.
MessageBox.Show(myString, "Selection fore color information")
Comentarios
Normalmente, use este método si va a crear un diseñador para o DataGridTableStyle crear su propio control que incorpore .DataGridTableStyle Puede usar el ShouldSerializeSelectionForeColor método para determinar si el valor de la propiedad ha cambiado de su valor predeterminado.
Se aplica a
Consulte también
Comentarios
https://aka.ms/ContentUserFeedback.
Próximamente: A lo largo de 2024 iremos eliminando gradualmente GitHub Issues como mecanismo de comentarios sobre el contenido y lo sustituiremos por un nuevo sistema de comentarios. Para más información, vea:Enviar y ver comentarios de