Want to display a Font Choice dialog appropriate for UWP app. Is there such a class in winrt? Or do we need to roll our own?
I should have searched for Font Picker. Found a discussion in another forum that seems to have an answer: No. There is no standard font picker for winrt. Seems like something that would be a useful addition!
Related
I am implementing drag and drop for a UWP application and all is working well, except for the Font on the DragUI caption.
I have DragUIOverride.IsCaptionVisible = True and DragUIOverride.Caption = "My Text String",
but does anyone know how to change the font? My application uses a unique font and the system font stick out like a sore thumb.
(On a similar vein, I had the same issue with ToolTips, but figured out how to set a new style for ToolTip in <Application.Resources>, but I cant seem to find anything (i.e. a TargetType) for the DragUI text.)
Any help appreciated.
Can the Font for a UWP Drag and Drop (DragUI) caption be changed?
I'm afraid, you can't change the font style for DragUIOverride.Caption, currently, there is not such api to change Caption font, it was manage by the system. And you could post your requirement with windows feed back hub.
And we have a workaround that use SetContentFromBitmapImage method insert text image to replace DragUIOverride.Caption. For more please refer XamlDragAndDrop code sample
I am making some add-in to PowerPoint.
I would like to let user choose color using colordialog (or some other this kind control). But it would be the best if it would look exactly like built-in color dialog/color picker in PowerPoint, and with the same colors in sections Theme Colors, Custom Colors and Standard Colors. Is it achievable? If yes, how can I achieve it?
It really depends on what you need to use the color for. Office has many pre-defined controls that can be easily incorporated into an addin, some of which use the standard Office color picker (which includes the theme colors, custom colors, etc. that you are looking for). You can download a list of all Office controls from the Microsoft website (you will only need to use the PowerPointControls.xlsx file). Any of the controls listed in the file can be added to your addin by specifying the idMso in the ribbon XML (assuming you are creating a ribbon). You will need to look through all of the controls to se if there is one that matches the functionality you are looking for.
Note that most of the controls have some sort of additional functionality attached to them in addition to selecting a color. I have not yet found one that selects and returns a color. Hopefully what ever functionality you are in need of is included in one of the controls. You may be able to get a better answer if you provide more information on your specific application.
Is it possible to access the TextBlock Template to change the border and make it curved?
I tried editing the Template through Blend but with no success.
I'm trying to achieve something like this (couldn't get that given solution working):
Curve TextBlock in Windows 8
I'm trying to do this in C#/XAML - WINRT (Windows 8.1)
I don't think a TextBlock has a template you could modify. It's probably just some parameters used to tell DirectWrite what text to render and with what properties. The easiest way to solve it is when your text is constant to just break it apart into multiple single letter TextBlocks and lay them out on a path using Blend or Illustrator. If don't control what text can show up on the path - you'd have to code up the layout algorithm. Chris's link seems like a good place to start.
There isn't a clean way to do this directly in Xaml. Like Filip says, you can approach it by breaking the letters apart. That can work well for long sentences with small letters, but can be pretty chunky with large or connected letters. If you need smoother rendering then you can interop to Direct2D.
MSDN has a Direct2D animated text on a path sample which you could combine with the XAML SurfaceImageSource DirectX interop sample
I am trying to make a GUI like a iPad/iPhone, so to be able to make it look good, of course you need to use a font like Apple. I have downloaded it - MyriadPro-Semibold and put it in the control panel font's folder, but when selecting a font, it is not there. I found this online:
Label1.Font = Resources.GetFont(Resources.FontResources.MyriadPro-Semibold)
I suspect it is C (minus the ";" at the end of the line), but I don't know. Should I have to put the font in the resources or what?
Thanks in advance.
Myriad Pro is an OpenType font. Only WPF supports such fonts, Winforms requires a TrueType font.
Just one hint, when you copy Apple fonts then be sure to not be successful. Apple has a lot of lawyers and isn't afraid to use them. Especially when the font is used for their corporate logo.
Has anyone managed to modify the default font size for a AutoComplete TextBox, Windows Forms.
No, the underline Windows API does not have an option to change the font size. If you need to customize the suggest list's appearance you need to implement autocomplete by yourself.
Suggested reading:AUTOCOMPLETEOPTIONS