Click here to Skip to main content
15,890,512 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: How do you vertically center an Expander within a ScrollViewer when it expands? [SOLVED] Pin
fjparisIII1-Jun-10 18:27
fjparisIII1-Jun-10 18:27 
GeneralRe: How do you vertically center an Expander within a ScrollViewer when it expands? [SOLVED] Pin
Abhinav S1-Jun-10 23:22
Abhinav S1-Jun-10 23:22 
GeneralRe: How do you vertically center an Expander within a ScrollViewer when it expands? [SOLVED] Pin
fjparisIII2-Jun-10 4:32
fjparisIII2-Jun-10 4:32 
GeneralRe: How do you vertically center an Expander within a ScrollViewer when it expands? [SOLVED] Pin
fjparisIII2-Jun-10 11:04
fjparisIII2-Jun-10 11:04 
QuestionMore complex databinding Pin
Lutosław1-Jun-10 2:40
Lutosław1-Jun-10 2:40 
AnswerRe: More complex databinding Pin
Abhinav S1-Jun-10 3:16
Abhinav S1-Jun-10 3:16 
QuestionRe: More complex databinding Pin
Lutosław1-Jun-10 5:00
Lutosław1-Jun-10 5:00 
AnswerRe: More complex databinding Pin
AspDotNetDev2-Jun-10 12:56
protectorAspDotNetDev2-Jun-10 12:56 
I've run into similar problems before. I'm not sure why, but FindAncestor just doesn't seem to want to work sometimes. Might have something to do with the fact that you are using a data template. The workaround is to name your ListBox:
XML
<Grid>
    <Grid.Resources>
        <x:Array
            x:Key="strings" Type="core:String"
            xmlns:core="clr-namespace:System;assembly=mscorlib">
            <core:String>Hello</core:String>
            <core:String>Goodbye</core:String>
        </x:Array>
    </Grid.Resources>
    <ListBox Name="myList" ItemsSource="{StaticResource strings}">
        <ListBox.ItemTemplate>
            <DataTemplate>
                <ComboBox
                    ItemsSource="{Binding ElementName=myList, Path=ItemsSource}"
                    SelectedIndex="0" />
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
</Grid>

You could also add a property to your Window and bind to that. Or, you can add a property, "Parent", to each item in the list that points back up to the list (in which case you can just bind to the parent property to get the parent list).

QuestionAs www.k12.com in this site i need About us menu pop as it is in using silverlight control Pin
Ch.Gayatri Subudhi30-May-10 20:12
Ch.Gayatri Subudhi30-May-10 20:12 
AnswerRe: As www.k12.com in this site i need About us menu pop as it is in using silverlight control Pin
Abhinav S30-May-10 20:23
Abhinav S30-May-10 20:23 
GeneralRe: As www.k12.com in this site i need About us menu pop as it is in using silverlight control Pin
Ch.Gayatri Subudhi30-May-10 20:34
Ch.Gayatri Subudhi30-May-10 20:34 
QuestionValidation in silverlight datagrid? Pin
mittalpa30-May-10 6:11
mittalpa30-May-10 6:11 
QuestionWPF and Threading Pin
cdpace30-May-10 2:44
cdpace30-May-10 2:44 
AnswerRe: WPF and Threading Pin
Abhishek Sur1-Jun-10 0:48
professionalAbhishek Sur1-Jun-10 0:48 
GeneralRe: WPF and Threading Pin
AspDotNetDev2-Jun-10 9:14
protectorAspDotNetDev2-Jun-10 9:14 
QuestionAdd a 'faked' item to a ListBox which serves as an "Add New Item" button Pin
Lutosław30-May-10 0:57
Lutosław30-May-10 0:57 
AnswerRe: Add a 'faked' item to a ListBox which serves as an "Add New Item" button Pin
Kevin Marois1-Jun-10 8:24
professionalKevin Marois1-Jun-10 8:24 
GeneralRe: Add a 'faked' item to a ListBox which serves as an "Add New Item" button Pin
Lutosław1-Jun-10 8:50
Lutosław1-Jun-10 8:50 
GeneralRe: Add a 'faked' item to a ListBox which serves as an "Add New Item" button Pin
Kevin Marois1-Jun-10 10:26
professionalKevin Marois1-Jun-10 10:26 
AnswerRe: Add a 'faked' item to a ListBox which serves as an "Add New Item" button Pin
Pete O'Hanlon1-Jun-10 21:20
mvePete O'Hanlon1-Jun-10 21:20 
QuestionStoryboard animation should be infinite Pin
Tripathi Swati29-May-10 1:13
Tripathi Swati29-May-10 1:13 
AnswerRe: Storyboard animation should be infinite Pin
Not Active29-May-10 3:22
mentorNot Active29-May-10 3:22 
GeneralRe: Storyboard animation should be infinite Pin
Tripathi Swati31-May-10 0:13
Tripathi Swati31-May-10 0:13 
QuestionData Binding - I Don't Get It Pin
#realJSOP27-May-10 12:22
mve#realJSOP27-May-10 12:22 
AnswerRe: Data Binding - I Don't Get It Pin
Pete O'Hanlon27-May-10 12:34
mvePete O'Hanlon27-May-10 12:34 

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.