I am developing a windows 8 metro Application and I want to add stroke to the text. I found out that there is no built-in function to do that. I tried to overlap two texts with different size but that was not giving the desired result. I want the result that the Cut The Rope is using. Here is a screenshot :
I want the effect where they have written total 36 as the number can vary.
I Unzipped there .xap file and checked there assets to see whether they are using image but there were no image.
I am stuck on this... Please help, I want to achieve this in C#/XAML.
On a quick search I didn't find anything relevant, but you could try something else :
Why not use a font which already has a stroke? You can use a lot of kind of fonts, as long as you add them to your project.
As you can read here, it's quite easy.
Add your font file to your project and set the Build Action from Properties to Content. Then use it in FontFamily in XAML :
<TextBox Text="sampleText" FontFamily="Assets/Fonts/FontFileName.ttf#FontName" />
Related
Hello I am creating a c# code editor application with ScintillaNet control. I am implementing a functionality where syntax errors are shown while typing. I wanted an X image to be shown on lines with errors.
For this, I used MarkerSymbol.RgbaImage(bitmap);
The problem is that I can ot find any margin mask that worked with it.
The masks Marker.MaskAll and Marker.MaskFolders show the x image but also show folding symbols that I dont want. The rest of the masks dont even show the image. I found that the rgbaimage marker’s index is 30, but I tried (1<<30) for the mask and still nothing was shown. The image only show in maskall and maskfolders but also folding symbols are shown over it.
I don’t know how to solve this. Also though of using text instead of symbols for the MarginType but I cannot find on internet any tutorial or documentations on how to implement it, especially on C# for scintillaNet. Can you help me?
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'm using Ribbon from RibbonControlsLibrary.dll 4.0.0.11019, .NET 4.0, C#, WPF.
It can be downloaded with a free samples here: http://www.microsoft.com/en-us/download/details.aspx?id=11877
The problem comes when a RibbonToggleButton is displayed. Then it's image seems to be a little bit broken, like a part of image is shifted for a few pixels.
EDIT: Thanks to kind people I can post and image now:
Here are some details:
Image is displayed in it's large variant
Image size is 32x32
I set image scaling to none for all the images of Ribbon
Image is broken only when the text in RibbonToggleButton has 1 line
Same image displays correctly in any other kind of button (RibbonButton, RibbonSplitButton etc.)
The image is displayed correctly when I set the font size in Windows to Medium (125%)
My OS is Windows 8
When I set the VerticalContentAlignment for the toggle button to "Bottom", the Image starts to display correctly, but the whole Ribbon starts to look ugly.
I experience this problem for all the toggle buttons, including those which are in a Microsoft's free samples.
I guess that probably the Image doesn't have enough space, so it's compressed from 32x32 to some smaller size.
I use the theme that is made of Microsoft's Generic theme, that is included in the RibbonControlsLibrary.dll. I guess I could fix the RibbonToggleButton template somehow, but I have no idea what to fix there.
Any ideas?
In the xaml declaration of your UserControl / Window put that line:
RenderOptions.BitmapScalingMode="HighQuality"
I tried to changed the logo in the network flyout which is set via the DeviceMetaDataFile via the CarrierControlSchema. Right now I have a working Provisioning XML file and I added the branding tags.
Changing the Name is no Problem, that changes are displayed immediatelly. But my logo is not changed at all, though I have tried several ways to define it.
Right now I have:
<Branding xmlns="http://www.microsoft.com/networking/CarrierControl/WWAN/v1>
<Logo>iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAA3SURBVFhH7c4hAQAgEATBgxxI+jcjA2/o8IJZs3bGWfumsfneFgAAAAAAAAAAAAAAAADA74CkABY+AmyW5KeVAAAAAElFTkSuQmCC</Logo>
<Name>Sample Name</Name>
</Branding>
In this example I just tried to use a plain 32x32 png image all filled with red colour.
Can you please help me and tell me I am doing wrong.
Thank you very much.
I'm sure this is a common problem, but I haven't been able to find it.
I have a website and I want the user to be able to print a rectangle on their printer that is 3.5 inches x 2 inches. Exactly (within reason).
What's the best way to do this?
EDIT: To clarify - I'm looking to print a bunch of multicolored Text within a rectangle that needs to be a specific physical size. I also need to print specific shapes around some of the letters.
I'd looked into some of the .NET Printing stuff and found examples of measuring/drawing strings and shapes; but I didn't see anything that would let me specify a specific size.
Is this what you are looking for?
<div style="width:3.5in;height:2in;border:1px solid black;"></div>
CSS allows other physical sizes too:
http://msdn.microsoft.com/en-us/library/ms531211%28v=vs.85%29.aspx