FAQ Database Discussion Community


Expand and Collapse a WPF Expander

c#,wpf,expander
I have two Expanders in a DockPanel control, the first Expander that is at the top is set to isExpanded true while the other Expander is not. I just want the second Expander to go up whenever the first Expander is set to isExpanded false in run time... Here is...

Altering border's corner radius on WPF Expander control?

wpf,expander,cornerradius
Very high up the visual tree in WPF's Expander control is a border element (see screenshot). By default this has a CornerRadius of 3. Is it possible to modify this value? ...

How to get a WPF Popup to close when focus is lost

c#,wpf,treeview,expander
From other post suggestions I have customized an expander so when pushed it opens a Popup with a TreeView in Everything is working as expected, except one thing. If i click outside the popup it doesn't close even though I have set StaysOpen=False (I have tried to replace the TreeView...

Expander in TabItem.Header is eating the click

wpf,tabcontrol,expander
What I want to do is have the tabitem content only visible when the TabItem IsSelected and Expander IsExpanded The problem I have right now is: - if the Expander IsHitTestVisible="False" then the TabItem IsSelected but the Expander does not Expand (/Collapse) - if the Expander IsHitTestVisible="True" then the TabItem...

WPF expander not expanded above buttons make buttons unclickable

wpf,xaml,clickable,expander
In a WPF form, I have an expander that expands above other controls, such as buttons : <Expander Grid.Row="0" Panel.ZIndex="99" Name="searchMenuExpander" Header="Search menu" FontWeight="Bold" HorizontalAlignment="Stretch" Margin="10,10,0,0" MinWidth="510" MinHeight="200" VerticalAlignment="Top" Foreground="MidnightBlue" Cursor="Arrow"> <Grid Background="White"> <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" /> <TextBlock Text="Name" HorizontalAlignment="Left" VerticalAlignment="Top"...

Expander.Header ToolTip active even with Expander.IsEnabled=false

wpf,tooltip,expander
If the Expander.IsEnabled=false then the tooltip on the header is not active. Is there a way to have a ToolTip even if Expander.IsEnabled=false? <Expander.Header> <TextBlock Text="Export" ToolTip="ToolTip - I don't show up if Expander.IsEnabled=false" Style="{StaticResource TabItemHeaderSemiBold11}"/> </Expander.Header> ...

How to set div's id with jQuery function?

javascript,jquery,function,jsp,expander
I receive list of feed items from Servlets <c:forEach items="${feedItemsList}" var="feedItem"> <table class="contentItem"> <tr> <td> <div id="block"> <a id="" href="javascript:showFeedItem(${feedItem.id});"><c:out value="${feedItem.title}" /></a> </div> <div class="feedItemExpander" id="${feedItem.id}">...My info...</div> </td> </tr> </table> </c:forEach> I want to expand and collapse div with id=${feedItem.id}. Clicking on <a id=""...

WPF, Access combobox selected item

c#,wpf,combobox,expander
I have a combobox that has four static possible selections, shown below MainWindow.xaml <Grid> <ComboBox Name="combobox" IsEditable="True" SelectionChanged="ComboBox_SelectionChanged" Text="Default Text" <ComboBoxItem Name="ComboBoxItem1">1</ComboBoxItem> <ComboBoxItem Name="ComboBoxItem2">2</ComboBoxItem> <ComboBoxItem Name="ComboBoxItem3">3</ComboBoxItem> <ComboBoxItem Name="ComboBoxItem4">4</ComboBoxItem> </ComboBox> <StackPanel Name="dock">...

Style expander header background color in App.xaml

c#,.net,wpf,styles,expander
I'm trying to create a global style for Expander in WPF. This is what I achieved so far: <Style TargetType="Expander"> <Setter Property="HeaderTemplate"> <Setter.Value> <DataTemplate> <Border Background="Red"> <ContentControl Content="{Binding}" /> </Border> </DataTemplate> </Setter.Value> </Setter> </Style> And this is how it looks: Not very satisfying. Question: How can I change the background...