How to write Text in different colors in single word in win2d Canvas windows phone 8.1? - windows-phone-8.1

I use in xaml RichTextbox paragraph and run element with different color and Font Style.
how to add on this control in win2d Canvas and move in canvas?

Take a look at the CanvasTextLayout class, in particular its SetColor method.

Related

How can I avoid my windows phone tile icon being used as an alpha mask?

I am making a windows phone 8 app and I'm trying to make a nice tile for the start screen, so I opened my WMAppManifest.xml in Visual Studio, selected TemplateIconic and imported the desired image. My problem is that it's using my image as an alpha mask, so all the colours it has are simply transformed into white. I'd like to conserve all the colours from my image.
How can I avoid my tile icon being used as an alpha mask?
Go to WMAppManifest.xml and set Tile Template as TemplateFlip.

Windows Phone 8 tile doesn't show correct image

Does anyone know why my Win Phone 8 app tile doesn't show the icon I set? This is what I get (and yes, am am sure that's not my app's icon):
This is what I have so far and I ran out of ideas of what can be wrong:
The small icon is a png of 110x110
The medium icon is a png of 202x202
Both images have the build Type = Content
Both images have the copy to output property = Copy if newer
The application icon is the same as the small icon and it shows alright in the program list.
Here is a part of my app's manifest:
<TemplateIconic>
<SmallImageURI IsRelative="true" IsResource="false">Assets\Icons\AppIcon_small.png</SmallImageURI>
<Count>0</Count>
<IconImageURI IsRelative="true" IsResource="false">Assets\Icons\AppIcon_medium.png</IconImageURI>
<Title>
</Title>
<Message>
</Message>
<BackgroundColor>
</BackgroundColor>
<HasLarge>false</HasLarge>
<LargeContent1>
</LargeContent1>
<LargeContent2>
</LargeContent2>
<LargeContent3>
</LargeContent3>
<DeviceLockImageURI IsRelative="true" IsResource="false">
</DeviceLockImageURI>
</TemplateIconic>
If you use TemplateIconic tile the images need to be transparent icons as outlined in Iconic Tile template for Windows Phone 8 because it is just going to end up being a white icon inside a tile. Your image appears as a white square because it does not have any transparency. With the images you have, you would want to use the TemplateFlip tiles and adjust the size of your tiles accordingly.
I had the same problem.
After a lot of brainstorming I tried this and woah it worked!
Check if the image you are setting has a white (or other) background color. If it has, remove the background from the image using Photoshop(Tool: magic eraser) and keep the background transparent.
Replace this transparent background image and it will show up in emulator!
Hope this works at ur end too! :)
Did you look at the manifest file? You can choose the images in that file. I mean using the UI in the studio, open the manifest file and choose the image.
According to Iconic Tile sizing info in Iconic Tile template for Windows Phone 8, both small icon and medium icon must be design with transparent background.
The small icon is a png of 70x110
The medium icon is a png of 130x202
If you need to set the background color, set the BackgroundColor in WMAppManifest.xml as follow.
<BackgroundColor>[hex ARGB format color]</BackgroundColor>
I work with Xamarin.Forms (Shared) for my WP-app and also had problems to implement the Tile in the WP-part of my project.
To set the background to transparent to the tile image have done the job.
But I have used images with 158x158 and 336x336 what also works and allows to use the standard-icon (in a higher resolution) what - I think - most users want to do.
I have created a short description for all visitors, who use XF for WP-development (including app-icon, splash-screen and Tile).
How to add app-icon, splash-screen and Tile in a WP 8.0 XF-project

Windows Phone 8 - display text on tile

I want to display text on a secondary tile, like Evernote. Currently, I use the FlipTileData because it supports text on the BackContent property. The problem with FlipTileData is, that I only need the back tile, not the front.
Is there a way to set content on the front or to create a tile which does not flip?
Yes, it's possible. You start by creating a standard tile, then render a set of UI elements (eg. TextBlock) to an image to get the desired look, then set it as the 'BackgroundImage' of the tile.
The following tutorial and previous answer should help...
http://wp.qmatteoq.com/how-to-create-cool-custom-tiles-in-a-windows-phone-application/
https://stackoverflow.com/a/9659172/247257
As the above links assume Windows Phone 7, you will need to adjust the tile sizes for Windows Phone 8 and cater for the new wide tile size.

UI Components and Canvas Context

Is it possible to draw HTML UI Components onto a Canvas (2D) context ?
I would like to render, buttons, listboxes, text input controls onto a 2D Canvas Context.
This isn't possible using standard HTML elements. The canvas element is only used to render raster images. You can however emulate this behavior using canvas, but then you are required to keep track of everything such as the mouse position, states and events.

Bold and regular font in dynamic text under a mask In Flash with AS3

I have this text "my text is <b>bold</b> and regular".
I want "<b>bold</b>" to be... well, let's say... bold !
I have a mask layer under which there is a text field.
The text field shows htmlText, and i must embed chars. If not embedded, it doesn't display because of the mask. So the solution of importing 2 user fonts ( one bold and one regular) does not work.
I'm thinking this is impossible to do with Flash... Maybe I wrong, am I ?
Thank you !
The problem is that when you embed the characters, it only embeds normal-weight font characters. The Mask is a red-herring; this will happen whether you mask the TextField or not.
You can solve the problem however! Create another TextField in your FLA (off-stage, I imagine) with the same font at the same size, but set the font to bold. Embed characters in that TextField too.
Then, the bold characters in your first TextField will display as bold.
There are other ways to achieve this, especially if you don't use the Flash IDE to compile your swfs (if you use MXML through FDT, FlexBuilder, FlashBuilder or FlashDevelop for example). If you do, then you should lookup how to embed fonts using [Embed] metadata.