expander

Reset Expander to default collapse behavior

I'm using an expander inside a Resizer (a ContentControl with a resize gripper), and it expands/collapses properly when the control initially comes up. Once I resize it, the Expander won't properly collapse, as documented below. I ran Snoop on my application, and I don't see any heights set on Expander or its constituents. How would...

How to modify Expander button background only? WPF

I have an Expander placed on a window with a blue background and I would like to make the button for the expander another color than the default (blue, which it is receiving from the window). When I modify the background property of the expander it changes the entire expander, header and all to the new color. However, I would like only...

How can I indicate in an Expander header that collapsed contents have an error

Hi, I have expanders that contain text boxes, the text boxes use the wpf validation stuff to draw a red box around them ( text boxes are wrapped in Adorner Decorators to make sure I don't get empty red boxes everywhere when the expanders are collapsed) I want to indicate in the header of the expander that it has contents that have erro...

How can you stop an expander in a list box from collapsing when data changes?

I have a screen with a ListBox of items. The item template contains an expander control with some of the data in the header and some of the data in the content part of the expander. The data template for the ListBox ItemTemplate is similar to this: <DataTemplate x:Key="MyTypeTemplate" DataType="{x:Type MyType}"> <Expander DataContex...

Accordion-like one-element expanding component in jQuery UI

I need to implement an expanding/collapsing box in jQuery UI. When collapsed, only the box header would show. When expanded, the header+contents would show. What I need to do is very close to jQuery UI one-element accordion with alwaysOpen=false (the same property is called "collapsible" in document, but in practice with jQuery 1.3.2 an...

How to style a WPF Expander Header?

Hello, I would like to apply a style on a WPF Expander Header. In the following XAML I have an Expander but the style is for all of it not just for the header. Thanks. <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="640" > <StackPanel> <Stac...

How to make WPF Expander Stretch?

The Expander control in WPF does not stretch to fill all the available space. Is there any solutions in XAML for this? ...

How do I get content to realign around an expanding/collapsing WPF Expander?

Right now I have a Stackpanel, that contains a collapsed Expander, and a Listbox. The Listbox beneath the collapsed Expander is being positioned as if the Expander was expanded. Is it possible for the StackPanel to dynamically do layout based on the collapsed size of the Expander, and then on the Expanded size of the Expander once it's ...

Right-align items within wpf expander header

I want to have some text in an expander header left aligned, then some text right aligned. I have found how to expand the header to the width of the container, and thought I could simply add a dockpanel and set the second text block to Dock Right, but it doesn't seem to help. Any solutions? <Expander> <Expander.Header> <DockPanel ...

How to align TexBlocks in WPF Expander Header

Hi, I have Multiple Texblock in Expander Header. I want these TextBlocks aligned to Left, Right and Center. How can i achieve this? Please Help... Thanks Sharath The Text in Red should be left aligned, the one in blue should be center aligned and the green should be right aligned Please copy the code in XAMLPad.Exe ...

Accessing expander from Listbox's groupstyle

Hi, I am using a WPF Listbox which is databound to an ICollectionView to display a list of items that can be filtered. And I am using context menu on the ListBox to group the items in the Listbox. For this, I have defined a groupstyle on the Listbox and it has an expander in it. The code for the same is as below. All the xaml code is in...

Change header backgraound color for WPF expander

Hi, I am trying to change the expander backgraund color, It seems so easy but I can't do that. <Expander Name="expOneDay"> <Expander.Header> <TextBlock Foreground="CadetBlue" Text="Some Text" HorizontalAlignment="Stretch" /> </Expander.Header> ... </Expander> why HorizontalAlignment="Stretch" doesn't ...

Making a collection of WPF Expanders 'expand' exclusively, i.e. only one expanded at a time.

I have a ListBox containing a group of 'Expander' items, and what I would like to do is make the 'IsExpanded' property for each of them exclusive - i.e. if I have 10 Expanders in the ListBox, I'd like only one to be open at a time... Soo at present I have: <Window> <Window.Resources> <DataTemplate x:Key="NormalTemplate"> ...

Style a WPF Expander to look like an Outlook ListView group header

How can you style a WPF Expander image to be +/- e.g. to look like an Outlook ListView group header as shown in the image below: Open Closed ...

WPF: Trigger a content resize with GridSplitter

I'm trying to force a grid/expander to reevaluate whether it needs a scrollbar, as it's showing emptiness. I'm using this layout: <Grid> <toolstrip /> <!-- fixed height row --> <Scrollviewer> <!-- * height --> <Grid> <!-- all rows are 'Auto' height --> <Expander /> <Expander> <!-- this one stretches far too high --...

How can I set the TabIndex on a WPF Expander control?

In this example window, tabbing through goes from the first textbox, to the last textbox and then to the expander header. <Window x:Class="ExpanderTab.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" ...

list expander (css problem)

here is the last site I work on.... http://www.nettoyants-ecolo-lemieux.com/ in ie6 when you click on the LAURENTIDES link (first on the right) the colum jump under the first even if it is flot.... in firefos.. it fine... Anybody have a clue how to fix that thanks in advance ...

WPF Listbox + Expander events

I have an Expander in the ItemTemplate of a ListBox. Renders fine. The issue I have run into is that I would like the ListBox_SelectionChanged event to fire when the expander is expanded and/or selected. The MouseDown event does not seem to bubble up to the ListBox. What I need is the SelectedIndex of the ListBox. Because the ListB...

How can I set the minimum size of a expander control in WPF ?

How can I set expander to show some content it encloses even in collapsed state ? I have the following code snippet, can anyone point changes to this code ? <Window x:Class="UI2.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="358" W...

Animate Expander in WPF

How to animate the expanded and collapsed actions of a Wpf expander control? ...