expander

Horizontal aligment WPF expander header

泄露秘密 提交于 2019-12-13 06:48:28
问题 I want to show my GroupName on left and button "ShowOnly" on the right of header row. I tried with this code but doesn't works. Could anyone help me? Thx My code : <Expander IsExpanded="True" > <Expander.Header> <DockPanel HorizontalAlignment="Stretch"> <TextBlock Text="{Binding Path=Name}" FontSize="18"></TextBlock> <Button Style="{StaticResource ButtonStyle}" Content="Show Only" HorizontalAlignment="Right" Padding="15,0,15,0" Click="Button_Click"></Button> </DockPanel> </Expander.Header>

ScrollViewer in Expander

≯℡__Kan透↙ 提交于 2019-12-13 05:22:51
问题 I have a ListBox with Expanders which in turn contains a ListBox. I would like to have both the ListBox with Expanders (listBox1) and the ListBox inside each Expander (listBox2) to have scroll functionality, but I cannot get the innermost scrolling to work (i.e. scrollViewer1 in my XAML). How can I get both scrollbars to work? <ScrollViewer x:Name="scrollViewer1"> <ListBox x:Name="listBox1" ItemsSource="{Binding Data}"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <Expander> <Expander

Indent first column in GridView of ListView

痞子三分冷 提交于 2019-12-13 04:23:45
问题 I have created a gridview by using list view. There is 2 level of nodes and I would like to indent the child node. Therefore, I have set the margin in the <ItemPresenter> . The result looks pretty good but the second and the third column also been indent and not align according to its header column. Any idea to indent only the first column but not the rest column? xaml <ListView Name="listViewResult" Margin="10,231,0,-299" BorderBrush="#FF000000" BorderThickness="1" > <ListView.View>

can't click in a TextBox with an Expander

北城以北 提交于 2019-12-13 02:07:46
问题 After adding an Expander over a TextBox , I'm not able to click on the original TextBox . For example <Grid Background="Yellow" Focusable="False"> <TextBox Margin="0,20,0,0" Background="Azure" Width="150" Height="30"/> <Expander Focusable="False"> <Grid Background="White" > <TextBox Background="LightGreen" Width="150" Height="30"/> </Grid> </Expander> </Grid> the above azure TextBox is not clickable: I have to tab in it... ... while the green one works fine Edit I've tried to add false

Collapse opened expanders in `Datatemplate`, when we open new one

≡放荡痞女 提交于 2019-12-13 00:37:57
问题 My view works like this. I have an Observable Collection, which contains objects put on the list. By clicking on any item, I can open an expander related to that item. Here is the question: How can I collapse (close) the previously opened expander when I open another one? I don't want to have a situation where multiple expanders are opened at the same time. My WPF code looks like this: <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <controls:Pivot> <controls:PivotItem> <ListBox

multiple iron-collapse not working, expands only first

非 Y 不嫁゛ 提交于 2019-12-12 20:09:17
问题 I'm trying to create multiple iron-collapse elements with content inside. I want the iron-collapse to expand when user clicks on a button. The problem is that I can't get each element expanded individually. The script catches only first element and does not affect the others. I've tried many code samples but without success. Can someone help me? My code is below: var expandContent = document.getElementById('mybutton'); expandContent.onclick = function(event) { var moreInfo = document

WPF grid expander listview fills up the space when gridsplitter moves

允我心安 提交于 2019-12-12 10:25:59
问题 I have the following .XAML: <Grid> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Expander Grid.Row="0"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="5"/> </Grid.RowDefinitions> <ListView Grid.Row="0"/> <GridSplitter Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Top" ShowsPreview="true" ResizeDirection="Rows" Height="5"/> </Grid> </Expander> <Expander Grid.Row="1"> <Grid> <Grid

WPF Expander Templating - Display Content above ToggleButton

感情迁移 提交于 2019-12-12 03:01:17
问题 I'm about to create a new Expander Control (learning purpose) by creating different templates but can't figure out what I'm doing wrong... ToggleButtonTemplate: <ToggleButton> <ToggleButton.Template> <ControlTemplate TargetType="ToggleButton"> <Border x:Name="eBB" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <Grid> <Path x:Name="Sign" Data="M 0,10 L 7.5,2.5 L 15, 10" Stroke="Black" Width="15"> <Path

How to make expander resize the grid?

六眼飞鱼酱① 提交于 2019-12-12 02:50:02
问题 I have an expander here like this, the border shown here is the grid around it: ----------------------------------- | | | ^ expander | |---------------------------------| How could I resize this grid when I expand this expander? The result is like this: ----------------------------------- | | | V expander | | | | | | content of expander | | | | | |---------------------------------| Please don't care about the window size or the outer grid size. I just want to resize this one. UPDATE: When

Dynamically create a treeview in windows phone 8 from Json data

落爺英雄遲暮 提交于 2019-12-12 02:13:22
问题 I am trying to create a Treeview dynamically in Windows Phone 8 from the json response from my server. This json response is nested to nested like a question asked in stackoverflow. I am very confused what approach me should use, i have deseriazlied my json object but how and where to map on xaml page ? Please suggest me what Data Structure should me use Treeview / ExpanderView / CollectionViewSource or any other Data Sturcture. My json is like following >Peter - - >user1 - - >user2 - -