Click here to Skip to main content
       

Silverlight / WPF

 
QuestionWPF Problem With WrapPanel In ListBox.ItemsPanel [UPDATED] [modified] PinmemberKevin Marois20-Aug-12 14:33 
QuestionSwitch WPF UI at runtime PinmemberEd Hill _5_17-Aug-12 0:43 
AnswerRe: Switch WPF UI at runtime PinmemberKenneth Haugland18-Aug-12 12:54 
GeneralRe: Switch WPF UI at runtime PinmemberEd Hill _5_18-Aug-12 23:45 
AnswerRe: Switch WPF UI at runtime PinmvpAbhinav S18-Aug-12 18:31 
GeneralRe: Switch WPF UI at runtime PinmemberEd Hill _5_19-Aug-12 21:57 
AnswerRe: Switch WPF UI at runtime PinprotectorPete O'Hanlon20-Aug-12 0:48 
QuestionWPF ListBox Question PinmemberKevin Marois15-Aug-12 15:22 
I'm working on a contacts list[^]
 
I have 2 questions:
 
1) I would like to only see the drop shadow when the contact is selected. Of course only one can be selected at any time.
 
2) How do i get the contact cards to flow across, right to left, then top to bottom? I'm guessing I need to implement a wrap panel, but I'm not sure how to fit it into my item template.
 
Here's my XAML:
 
<ListBox x:Name="Contacts"           
            ScrollViewer.VerticalScrollBarVisibility="Auto"
            ItemsSource="{Binding Contacts}"
            SelectedItem="{Binding SelectedContact}">
    <ListBox.ItemTemplate>
        <DataTemplate>
            <Border CornerRadius="3"
                    Height="200"
                    Width="300"
                    Padding="5"
                    Margin="8"
                    Background="White"
                    BorderBrush="DarkGray"
                    BorderThickness="1">
                <Border.Effect>
                    <DropShadowEffect Color="DarkGray"
                            ShadowDepth="7"/>
                </Border.Effect>
                <Border Margin="2"
                        CornerRadius="3"
                        Padding="4"
                        BorderBrush="LightSteelBlue"
                        BorderThickness="1">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Image Height="45"
                                Width="45" Source="/Falcon.UI.WPF;component/Media/Images/customer_48.png"
                                Grid.Row="0"
                                Grid.Column="0"/>
                        <StackPanel Orientation="Horizontal"
                                    Grid.Row="0"
                                    Grid.Column="1">
                                    
                            <TextBlock Style="{Binding PageHeaderLabelStyle}"
                                        FontSize="28"
                                        Foreground="#2B579A"
                                        Text="{Binding FirstName}"/>
                            <TextBlock Style="{Binding PageHeaderLabelStyle}"
                                        FontSize="28"
                                        Foreground="#2B579A"
                                        Margin="5,0,0,0"
                                        Text="{Binding LastName}"/>
                        </StackPanel>
                        <TextBlock Grid.Row="1"
                                    Grid.Column="1"
                                    Style="{Binding PageHeaderLabelStyle}"
                                    FontSize="18"
                                    Foreground="#2B579A"
                                    Margin="0,-10,0,0"
                                    Text="{Binding Title}"/>
                                
                    </Grid>
                </Border>
            </Border>
 
        </DataTemplate>
    </ListBox.ItemTemplate>
            
</ListBox>
 
Thanks
If it's not broken, fix it until it is

AnswerRe: WPF ListBox Question PinmemberEd Hill _5_15-Aug-12 22:07 
GeneralRe: WPF ListBox Question PinmemberKevin Marois16-Aug-12 6:10 
QuestionComboBox Dropdown Problem [modified] PinmvpJohn Simmons / outlaw programmer15-Aug-12 4:49 
AnswerRe: ComboBox Dropdown Problem PinprotectorPete O'Hanlon15-Aug-12 5:12 
GeneralRe: ComboBox Dropdown Problem PinmvpJohn Simmons / outlaw programmer15-Aug-12 5:13 
GeneralRe: ComboBox Dropdown Problem PinmvpJohn Simmons / outlaw programmer15-Aug-12 5:17 
GeneralRe: ComboBox Dropdown Problem PinmvpJohn Simmons / outlaw programmer15-Aug-12 6:45 
AnswerRe: ComboBox Dropdown Problem PinprotectorPete O'Hanlon15-Aug-12 22:59 
GeneralRe: ComboBox Dropdown Problem PinmvpJohn Simmons / outlaw programmer16-Aug-12 1:27 
GeneralRe: ComboBox Dropdown Problem PinprotectorPete O'Hanlon16-Aug-12 1:46 
GeneralRe: ComboBox Dropdown Problem PinmvpJohn Simmons / outlaw programmer17-Aug-12 4:05 
GeneralPut Blu-ray movies on New iPad and keep the file size around 2GB Pinmemberhihjay114-Aug-12 19:07 
QuestionHow to got Phone Number PingroupVikash Yadav14-Aug-12 16:29 
AnswerRe: How to got Phone Number PinprotectorPete O'Hanlon14-Aug-12 22:20 
AnswerRe: How to got Phone Number PinmvpAbhinav S14-Aug-12 23:08 
QuestionNeed to call third party API from SL 5 Solution PinmemberTbhavesh14-Aug-12 9:03 
AnswerRe: Need to call third party API from SL 5 Solution PinmemberWes Aday14-Aug-12 9:47 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.140814.1 | Last Updated 20 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid