Font.Bold Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Bunun Font kalın olup olmadığını gösteren bir değer alır.
public:
property bool Bold { bool get(); };
public bool Bold { get; }
member this.Bold : bool
Public ReadOnly Property Bold As Boolean
Özellik Değeri
true bu Font kalın ise, değilse, false.
Örnekler
Aşağıdaki kod örneği işlecini Inequality , oluşturucuyu Font ve Bold özelliğini gösterir. Bu örnek, adlı Button2bir düğme içeren bir Windows Formu ile kullanılacak şekilde tasarlanmıştır. Aşağıdaki kodu formunuza yapıştırın ve yöntemini düğmenin Click olayıyla ilişkilendirinButton2_Click.
void Button2_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
if ( this->BackColor != SystemColors::ControlDark )
{
this->BackColor = SystemColors::ControlDark;
}
if ( !(this->Font->Bold) )
{
this->Font = gcnew System::Drawing::Font( this->Font,FontStyle::Bold );
}
}
private void Button2_Click(System.Object sender, System.EventArgs e)
{
if (this.BackColor != SystemColors.ControlDark)
{
this.BackColor = SystemColors.ControlDark;
}
if (!(this.Font.Bold))
{
this.Font = new Font(this.Font, FontStyle.Bold);
}
}
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
If (Color.op_Inequality(Me.BackColor, SystemColors.ControlDark)) Then
Me.BackColor = SystemColors.ControlDark
End If
If Not (Me.Font.Bold) Then
Me.Font = New Font(Me.Font, FontStyle.Bold)
End If
End Sub