I know that MSDN states that this is not possible but is there any possible workaround/hack to change the colour of the text on a secondary tile?
The only way to change font color is make text as your background image.
You can do like this:
put textBlock in a grid, change font color.
Render this grid to an image.
then save it to storage.
and set it as background image of tile.
Related
I am doing a menu like the following in c# for a school small game.
I am using the labels to create this, but how can I do that orange color behind it? The only solution I see, is exporting that text as png and use it as image instead of label. Is there a better way to do it?
You can export that text as a png and use it as an image, or you can style it with a label. But using labels will be very troublesome. First you need to add a label at the appropriate position. Set the label's AutoSize to false so that you can adjust the shape and size of the label arbitrarily. Then adjust the BackColor and ForeColor of the label to orange. Finally, place these labels on the edges of the letters to achieve a 3D effect.
Such as “o”:
So the best option is creating a class to manage this text labels?
I'm doing the table game battleship, by moving pictures boxes with the mouse, the problem is that all the picture boxes that I have contain an image without background, but i have the problem that when I move it through different points, it shows a default background instead of showing the background of the "map". This messes the aspect of the game table.
I've tried this code in my program ,but it makes the ships default position is in the panel(which I do not want) and it doesn't solve the problem I described earlier (when you move ships over the others spaces)
Barco1.Parent = panel1;
Barco1.BackColor = Color.Transparent;
An example of one of the ships
As you can see in the picture, there are:
Form with a BackgroundImage,
Panel with BackColor = Color.Transparent and BackgroundImage = some-image and
PictureBox with BackColor = Color.Transparent and an image as its Image property.
It should work for you.
It looks like You are setting the Image background as Transparent but You are adding that Image into another Panel!
Barco1.Parent = panel1;
So, Set the Background Color of the Panel1 as Transparent:
panel1.BackgroundColor=Color.Transparent;
Is it possible to create an irregular grid shape?
I attached a picture which clearly explains my intentions.
You could use ColumnSpan to merge those cells.
If you want them to look as if they're not part of the grid, then set their background color to the window background color.
I am making an application in C#.NET with Visual Studio 2012.
I have a picture in my background form. I have several picture boxes on it. I used .png images with transparent background but in my form it is not transparent when it comes above another image.
Set your picture box back color property to transparent.
pictureBoxTest.BackColor = Color.Transparent;
To further explain, an image with a transparent background will inherit the picture box's background color. You need to set the color to transparent as well to ensure it truly is.
I created a brush to assign a color the the button foreground. But I cannot figure out to retrieve the color back?
I find a few solutions but there were very complicated.
I set the button foreground color to be BLACK.
Now I need a code that, provided with a button, retrieve the color and returns BLACK (in this example).
If you want to retrieve the current color of your element you can simply assign a new Color variable from the button like this:
Color getColor;
getColor = button1.ForeColor;
Console.WriteLine(getColor); /* To print the retrned color in the debug console */