-2
在的WinForms很容易如何更改WPF中的字體?
private void mfont_Click(object sender, System.EventArgs e)
{
fd.ShowColor = true;
fd.ShowDialog();
txt.Font = fd.Font;
txt.ForeColor = fd.Color;
}
如何做相同的WPF?我打開字體對話框,但我不知道如何使這兩條線在WPF工作:
private void mfont_Click(object sender, System.EventArgs e)
{
txt.Font = fd.Font;
txt.ForeColor = fd.Color;
}
看看對象IE的屬性點擊元素設置字體,在屬性中可以設置它。如果你想在代碼中做到這一點,設置元素的ID,並在代碼中設置它 – cpoDesign 2012-03-18 20:46:41