Click here to Skip to main content
15,905,686 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Late binding Pin
Jammer12-Dec-08 8:00
Jammer12-Dec-08 8:00 
GeneralRe: Late binding Pin
Mycroft Holmes10-Dec-08 12:18
professionalMycroft Holmes10-Dec-08 12:18 
GeneralRe: Late binding Pin
Pete O'Hanlon11-Dec-08 2:26
mvePete O'Hanlon11-Dec-08 2:26 
GeneralRe: Late binding Pin
Mycroft Holmes11-Dec-08 3:59
professionalMycroft Holmes11-Dec-08 3:59 
GeneralRe: Late binding Pin
Jammer12-Dec-08 8:02
Jammer12-Dec-08 8:02 
Questioncontrol name in datatemplate Pin
sydney1239-Dec-08 19:23
sydney1239-Dec-08 19:23 
AnswerRe: control name in datatemplate Pin
Pete O'Hanlon9-Dec-08 22:34
mvePete O'Hanlon9-Dec-08 22:34 
QuestionListView Grouping W/Expander Help Pin
aaj239-Dec-08 8:51
aaj239-Dec-08 8:51 
Hey guys, I read a couple of the articles on here as well as the MSDN Sample for this task however I seem to be stuck; was hoping you guys could help me.

The following is my code, and although the items appear in the list perfectly, the ExpanderHeader appears with no text despite my text binding and I haven't the foggiest idea what I'm doing wrong.

Any help would be greatly appreciated!

<CollectionViewSource x:Key='mrpSource'>
<CollectionViewSource.GroupDescriptions>
<d:PropertyGroupDescription PropertyName="Vendor" />
</CollectionViewSource.GroupDescriptions>
</CollectionViewSource>

<ListView BorderThickness="0" ItemsSource="{Binding Source={StaticResource mrpSource}}" Margin="15,0,25.221,-520" Name="lvMRP" VerticalAlignment="Bottom" Height="494">
<ListView.GroupStyle>
<GroupStyle>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Margin" Value="0,0,0,5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander IsExpanded="False" BorderBrush="SlateGray" BorderThickness="0,0,0,1">
<Expander.Background>
<RadialGradientBrush>
<RadialGradientBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform ScaleX="1.702" ScaleY="2.243"/>
<SkewTransform AngleX="0" AngleY="0"/>
<RotateTransform Angle="0"/>
<TranslateTransform X="-0.368" Y="-0.152"/>
</TransformGroup>
</RadialGradientBrush.RelativeTransform>
<GradientStop Color="Gainsboro" Offset="0"/>
<GradientStop Color="Cornsilk" Offset="1"/>
</RadialGradientBrush>
</Expander.Background>
<Expander.Header>
<DockPanel>
<TextBlock FontWeight="Bold" Text="{Binding Path=Vendor}" Margin="5,0,0,0"/>
</DockPanel>
</Expander.Header>
<Expander.Content>
<ItemsPresenter />
</Expander.Content>
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
</ListView.GroupStyle>
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Path=CompanyPartNumber}" Width="310" HeaderContainerStyle="{StaticResource colHeaderStyle}">NRC/Jaro Stock#</GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Path=VendorPartNumber}" Width="310" HeaderContainerStyle="{StaticResource colHeaderStyle}">Vendor Stock#</GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Path=CustomerPartNumber}" Width="310" HeaderContainerStyle="{StaticResource colHeaderStyle}">Customer Stock#</GridViewColumn>
</GridView>
</ListView.View>
<ListView.BitmapEffect>
<DropShadowBitmapEffect />
</ListView.BitmapEffect>
</ListView>


Code Behind:

((CollectionViewSource)this.Resources["mrpSource"]).Source = dt_MRPTEST.DefaultView
AnswerRe: ListView Grouping W/Expander Help Pin
Insincere Dave9-Dec-08 13:44
Insincere Dave9-Dec-08 13:44 
GeneralRe: ListView Grouping W/Expander Help Pin
aaj239-Dec-08 15:59
aaj239-Dec-08 15:59 
QuestionWhy do WPF storyboards lock/freeze target properties? Pin
Josh Fischer9-Dec-08 8:40
Josh Fischer9-Dec-08 8:40 
AnswerRe: Why do WPF storyboards lock/freeze target properties? [modified] Pin
Josh Fischer10-Dec-08 3:02
Josh Fischer10-Dec-08 3:02 
GeneralRe: Why do WPF storyboards lock/freeze target properties? Pin
Member 33786674-Mar-09 7:43
Member 33786674-Mar-09 7:43 
QuestionWPF base class DependencyProperty Pin
Doug Hagerman9-Dec-08 8:23
Doug Hagerman9-Dec-08 8:23 
QuestionGridViewColumn Pin
Mohammed Elkholy9-Dec-08 2:17
Mohammed Elkholy9-Dec-08 2:17 
AnswerRe: GridViewColumn Pin
Gideon Engelberth9-Dec-08 3:25
Gideon Engelberth9-Dec-08 3:25 
GeneralRe: GridViewColumn Pin
Mohammed Elkholy10-Dec-08 0:41
Mohammed Elkholy10-Dec-08 0:41 
QuestionWPF user controls Pin
koleraba7-Dec-08 9:46
koleraba7-Dec-08 9:46 
AnswerRe: WPF user controls Pin
ColinM1237-Dec-08 14:30
ColinM1237-Dec-08 14:30 
GeneralRe: WPF user controls Pin
koleraba7-Dec-08 20:43
koleraba7-Dec-08 20:43 
GeneralRe: WPF user controls Pin
Mark Salsbery8-Dec-08 7:36
Mark Salsbery8-Dec-08 7:36 
QuestionHow to drag-and-drop an .msg file from MS Outlook? Pin
Vipul Mehta6-Dec-08 1:34
Vipul Mehta6-Dec-08 1:34 
QuestionDataGrid for WPF - lc.exe not found Pin
Arijit Manna5-Dec-08 19:35
Arijit Manna5-Dec-08 19:35 
QuestionRe: DataGrid for WPF - lc.exe not found Pin
Mark Salsbery6-Dec-08 6:26
Mark Salsbery6-Dec-08 6:26 
AnswerRe: DataGrid for WPF - lc.exe not found Pin
Pete O'Hanlon6-Dec-08 9:32
mvePete O'Hanlon6-Dec-08 9:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.