expander

Multiple Expander have to collapse if ONE is expanded

陌路散爱 提交于 2019-11-28 07:01:14
Having 4 Expander controls. When one expander is expanded how can I make all others collapse/close? Try out following code: XAML: <StackPanel Name="StackPanel1"> <StackPanel.Resources> <local:ExpanderToBooleanConverter x:Key="ExpanderToBooleanConverter" /> </StackPanel.Resources> <Expander Header="Expander 1" IsExpanded="{Binding SelectedExpander, Mode=TwoWay, Converter={StaticResource ExpanderToBooleanConverter}, ConverterParameter=1}"> <TextBlock>Expander 1</TextBlock> </Expander> <Expander Header="Expander 2" IsExpanded="{Binding SelectedExpander, Mode=TwoWay, Converter={StaticResource

Time Delay on Trigger

倖福魔咒の 提交于 2019-11-28 05:06:30
问题 I wish to attach a time delay to a mouseover event on a WPF expander I have on my form (xaml supported by VB.NET code behind). This mouseover event essentially triggers the expansion as oppose to clicking - but I'd like a short wait before the content is expanded. So far I have not managed to find anything to solve this via the wider internet. The current xaml code to enable the trigger is: <Style x:Key="HoverExpander" TargetType="{x:Type Expander}"> <Style.Triggers> <Trigger Property=

Add an expander (collapse/expand) to a Panel WinForm

我的梦境 提交于 2019-11-27 20:29:23
I have a panel containing a DataGridView and 3 buttons at the bottom of a form. I want to add the possibility to expand and collapse this panel. Is there a way to do it in a Windows Forms application? Has someone done something similar? Jack There is another WinForms Expander : http://jfblier.wordpress.com/2011/02/16/window-form-expander/ The SplitContainer control has the ability to collapse one of its two panels. You could rig up a button to the Panel1Collapsed property. Take a look at my WinForm expander control - https://github.com/alexander-makarov/ExpandCollapsePanel In general, it must

How to style a WPF Expander Header?

断了今生、忘了曾经 提交于 2019-11-27 10:06:54
问题 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> <StackPanel.Resources> <Style TargetType="Expander"> <Style.Resources> <LinearGradientBrush x:Key="BackBrush" StartPoint="0.5,0" EndPoint="0.5,1"> <GradientStop Color="#EF3132"

Combine expander and grid (resizable expander)

喜欢而已 提交于 2019-11-27 09:25:34
I would like to have something like a resizable Expander. My basic idea was something like this: <Grid HorizontalAlignment="Left"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="2" /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Expander Grid.Column="0" ExpandDirection="Right"> ... </Expander> <GridSplitter Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" /> ... </Grid> The problem with this: if i move the grid splitter and collaps the expander i got a big empty area. How can make the entire column collapse? Or is there another

Multiple Expander have to collapse if ONE is expanded

旧巷老猫 提交于 2019-11-27 01:40:31
问题 Having 4 Expander controls. When one expander is expanded how can I make all others collapse/close? 回答1: Try out following code: XAML: <StackPanel Name="StackPanel1"> <StackPanel.Resources> <local:ExpanderToBooleanConverter x:Key="ExpanderToBooleanConverter" /> </StackPanel.Resources> <Expander Header="Expander 1" IsExpanded="{Binding SelectedExpander, Mode=TwoWay, Converter={StaticResource ExpanderToBooleanConverter}, ConverterParameter=1}"> <TextBlock>Expander 1</TextBlock> </Expander>

Add an expander (collapse/expand) to a Panel WinForm

让人想犯罪 __ 提交于 2019-11-26 20:22:43
问题 I have a panel containing a DataGridView and 3 buttons at the bottom of a form. I want to add the possibility to expand and collapse this panel. Is there a way to do it in a Windows Forms application? Has someone done something similar? 回答1: There is another WinForms Expander : http://jfblier.wordpress.com/2011/02/16/window-form-expander/ 回答2: The SplitContainer control has the ability to collapse one of its two panels. You could rig up a button to the Panel1Collapsed property. 回答3: Take a

Combine expander and grid (resizable expander)

廉价感情. 提交于 2019-11-26 14:42:27
问题 I would like to have something like a resizable Expander. My basic idea was something like this: <Grid HorizontalAlignment="Left"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="2" /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Expander Grid.Column="0" ExpandDirection="Right"> ... </Expander> <GridSplitter Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" /> ... </Grid> The problem with this: if i move the grid splitter and