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

How to programmatically set the Width for the Popup in the AutoComplete control?

Platform: WPF |
Control: AutoComplete |
Published Date: January 29, 2015 |
Last Revised Date: October 4, 2016 |
.NET Framework: 4.5 |
Product Version: 12.3.0.36
Tags: wpf

Initially, the width for the popup is always smaller than the AutoComplete control width, but to initially increase the width for the popup, you can programmatically set the desired width for the popup.

To set the width for the popup in the AutoComplete control, get the popup from the AutoCompleteControl template and set the MinWidth for the popup.

The following code example illustrates how the popup for the AutoComplete is set narrower than the initial.

C#

The following screenshot illustrates the output.

Figure 1: Popup width changed

ADD COMMENT
You must log in to leave a comment
Comments
Eric T Carter
Aug 10, 2016
i have to check this out now and come back with feedback.but l do trust this source
Reply
Emanuele Quarello
Oct 04, 2016
Could you please explain this line?
 Popup pop = AutoCompleteControl.Template.FindName("PART_Popup", Autocomplete Control) as Popup;

What "Autocomplete Control" is supposed to be?

Reply

Please sign in to access our KB

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