We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Label for RibbonTextBox

Thread ID:





129049 Feb 23,2017 11:59 AM UTC Feb 28,2017 11:10 AM UTC WPF 5
Tags: Ribbon
Adam Jones
Asked On February 23, 2017 11:59 AM UTC


Is there a way to set a label for the RibbonTextBox so that it appears before the textbox?



Priyanga Balasubramaniam [Syncfusion]
Replied On February 24, 2017 11:21 AM UTC

Hi Adam,

Thank you for contacting Syncfusion Support.

Currently our RibbonTextBox does not have "Label" property support. We have prepared the workaround sample to meet your requirement.

In this sample, we have added the Attached property "Label" and "LabelHorizontalAlignment" in sample level. Using these properties, we can set Label for RibbonTextBox and align it horizontally.

Please download the sample from the below location.

Sample: RibbonTextBox

Priyanga B

Adam Jones
Replied On February 24, 2017 04:09 PM UTC

Hi Priyanga,

Thanks for the workaround, its ugly but it works and I'm happy :) 

fyi just incase you ever decide to add this as a feature - I ended up having the label on the left of the text box rather than above it.


Priyanga Balasubramaniam [Syncfusion]
Replied On February 27, 2017 09:51 AM UTC

Hi Adam,

Thank you for the update.

In UWP when we set Header for TextBox control it will be placed above the control. Based on this UI we have provided template to display the label above the RibbonTextBox in last updated sample. You can achieve your requirement by changing StackPanel orientation as “Horizontal” in RibbonTextBox template.

We will consider the above request as feature. If you could confirm some specific details, it would help us to implement the feature in line with your requirement.

Please review the following description of the feature and let us know if it conforms to your requirement.

Need to provide Label Property for the RibbonTextBox control to display the label and property to mention the position of label.

Priyanga B

Adam Jones
Replied On February 27, 2017 10:36 AM UTC


"Need to provide Label Property for the RibbonTextBox control to display the label and property to mention the position of label" is an adequate description.

Please note that the actual layout for having the label horizontal was a little more complicated than the vertical option and I needed to set both the stackpanel orientation as well as the VerticalAlignment and padding on the textblock in order for it to look consistent.  You might then want to expose LabelVerticalAlignment and LabelPadding as additional properties.

for Horizontal:
<StackPanel Orientation="Horizontal" >
Padding="0, 0, 5, 0"
HorizontalAlignment="{Binding Path=(local:RibonTextBoxWithLabel.LabelHorizontalAlignment), RelativeSource={RelativeSource Mode=TemplatedParent}}" 
="{Binding Path=(local:RibonTextBoxWithLabel.Label), RelativeSource={RelativeSource Mode=TemplatedParent}}" />      <Border         x:Name="Bd"         Background="{TemplateBinding Background}"         BorderBrush="{TemplateBinding BorderBrush}"         BorderThickness="{TemplateBinding BorderThickness}"         Width="{TemplateBinding Width}"         SnapsToDevicePixels="true">         <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />      </Border>

Thanks and Best Regards,


Keerthana Jegannathan [Syncfusion]
Replied On February 28, 2017 11:10 AM UTC

Hi Adam,

Thank you for helping us define this feature. We have added it to our feature request list and it will be include in any of our upcoming releases.

Keerthana J


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon