I have a problem about secondary tile. The title of my secondary tile is not obvious on the background image. So I want to add a title background which is a rectangle with the similar size as my title. But how can I do that? I have two ways in my mind.
Get my background image from internet, add the title background on it and store it locally. And when I make the tile, I'll use the local url. This method looks kind of overkill. I have to download the image and do some integration. And also I have to store the image locally.
Customize the title control, change its foreground. This method looks more elegant. But I'm not sure how I can customize the title in the secondary tile. Any suggestions?
Thanks!
Your first method is probably what you want. As far as I know, there's very little custmization you can do with the Standard tile class.
I was unhappy with the text for other reasons and ended up doing the equivalent of your 1st suggestion.
Related
So I'm trying to add a company logo to the middle of my NavigationPage Title section, and I have tried to use NavigationPage.TitleIcon="companytitleicon.png" inside XAML, but it doesn't display. I'm not certain if it's because the image has to be a certain size, and I cannot find information in the documentation.
I played around with other code as well, like calling NavigationPage.SetTitleIcon which takes a reference to a page and a FileImageSource like so:
NavigationPage.SetTitleIcon(this, "/Assets/dischemtitleicon.png");
I may be using it incorrectly, so I need a bit of advice, in general, with getting the logo to display on the Title section. I'll add a screenshot as well to specify the location and size of the logo. The logo is at least twice as wide as the height, eg. 120 x 50 ...
Any assistance will be truly appreciated. I'm also trying to get the colour of the MasterDetail bar to change, but that's not as crucial of an issue. (I added a global StaticResource that applies a fixed colour to all NavigationPage BarBackgroundColors)
If you are using a Xamarin.Forms app based on Shell then you can easily achieve this using Shell.TitleView without the need of a custom renderer, define your title content, bind it or even style it as you like.
You could refer to my similar answer https://stackoverflow.com/a/65062752/522820
I was adding something to my XNA project, and I downloaded the GIF animation library from https://xnagif.codeplex.com/
I added the pipeline and references as needed (I followed the sample GIF animation) and one of my gif images worked (yay) but I have decided to add more gif images and only the first image loaded animates normally, while the other ones do not...I just see a still image/frame.
How am I supposed to fix that?
Also just something extra, how can I make it so that I do not have specific color in the spritebatch.Draw parameters? I want the colors to remain as they are from image, but I can't find a way to get rid of the color restriction to be incolved as a parameter also. How can I get rid of that?
After long thought, I figured out a while ago that I had to update time in the other functions in seemed.
in my winform application i am trying to take screenshot of a image, and assign it to picturebox using DarwToBitmap() method.
it works fine for me, but when i zoom the image and then take screen shot, in picturebox only part of image that was visible on screen is being shown.
how can i capture screenshot of entire image, even if it is zoomed. ??
this is very much similar to what i am trying to do.
It was much more simple than i had expected.
just make zoom to 100% before calling 'DrawToBitmap' and save the image.
after that re assign the prev zoom value.
thats it. works like a charm.
I'd like to make some fancy live tiles. But I am not quite happy with the default options for it. Is there a way in C#/XAML or any site, that shows how to put an own design for a live tile?
the default font size of the Tile cannot be changed. You can only change the text. What you can do is create an image that has text on it and set that to the BackgroundImage or the BackBackgroundImage. You can create an image by using the WriteableBitmap or WriteableBitmapEx.
I've had a bit of a search around, but couldn't find anything similar to what I was looking for. I'm interested in knowing how to display differing contents on secondary/tertiary monitors or projectors using C#. Basically, what I'm wanting to achieve is to have some form of presenter view (a lá Powerpoint) on one particular screen (the primary display), and the output on a secondary screen or projector. I've never really attempted to develop something with multiple display outputs, so any guidance will probably have to be at a fairly obvious level.
If someone could point me in the right direction as to how to handle this sort of thing in C#, that would be greatly appreciated!
Just to expand on Keven's answer (I +1'd it), The Screen.AllScreens array gives you have an array of Screen objects. The Screen object has a property called IsPrimary, which you can use to determine which is the primary screen, and which is the secondary (duh) and it also has a property called WorkingArea, which is a rectangle that gives you back all the coordinates of the second screen. The cool thing about this is, that even if let's say the secondary screen is configured to be on the left of the primary, the WorkingArea.X will be a negative number, and you can place forms there or whatever.
You can use the System.Windows.Forms.Screen.AllScreens property to access a list of all the monitors Windows knows about. If you're looking to utilize a display that hasn't been configured by the user, it gets more difficult - you'd probably need to initialize and access the display adapter using DirectX.
One of the main classes you will need to interact with is Screen (this is in the WinForms namespace). In general all the screens are treated as a set of working areas that you can use the screen class to get properties for each one.
You can get all the screens like this...
Screen [] screens = Screen.AllScreens;
Here is a short article about doing multi-monitor programming in C#.
Also remember to set the property 'StartPosition' to 'Manual' on your the window you want to display on the secondary screen otherwise it will always display on the primary screen.