Search code examples
xamluwpfontsdrag-and-drop

Can the Font for a UWP Drag and Drop (DragUI) caption be changed?


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.


Solution

  • 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