Hello,Is it possible to set tile/imageStreamer 's font size without being set to default when the tile is clicked?Thanks
//To change Font for MainText and SubText.
foreach (LayoutGroup group in this.tileLayout1.Groups)
{
foreach (ImageStreamer img in group.Items)
{
img.Refresh();
img.MainText.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
img.SubText.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
}
}
//To set the Font for MainText and SubText when ImageStreamer is clicked.
void img_MouseUp(object sender, MouseEventArgs e)
{
if (sender is ImageStreamer)
{
(sender as ImageStreamer).SubText.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
(sender as ImageStreamer).MainText.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
}
}
|