ebcrypto
ebcrypto

Reputation: 610

AutoCompleteBox Dropdown width

Can the width of the dropdown be set to a different value than the AutoCompleteBox itself?

Upvotes: 5

Views: 1937

Answers (2)

jumbo
jumbo

Reputation: 4868

If you are not using Blend, just copy Default Style and Template of AutocompleteBox from MSDN and paste it into your App.xaml file (here is little tutorial on how to handle styles in app.xaml).

You can then modify that pasted style or template.

Upvotes: 0

Town
Town

Reputation: 14906

The Popup is a separate Part of the AutoCompleteBox, so it should be possible to extend that beyond the width of the text box.

In Blend, right-click on the AutoCompleteBox and select Edit Template > Edit a Copy, giving the new template a name.

Drill-down in the Objects and Timeline window to the 'Popup' part, and beneath that is a Grid. Change the width of that Grid to change the width of the popup content whilst maintaining the current width of the text box).

(I must admit I've only had chance to do this in Silverlight Spy, but it definitely works there so I can't see it being a problem doing it through Blend).

Upvotes: 2

Related Questions