Click here to Skip to main content
15,910,009 members
Home / Discussions / WPF
   

WPF

 
QuestionHow to bind the ComboBox which is in a ListView using collection Pin
DavJes24-Aug-10 4:44
DavJes24-Aug-10 4:44 
AnswerRe: How to bind the ComboBox which is in a ListView using collection Pin
Ian Shlasko24-Aug-10 5:17
Ian Shlasko24-Aug-10 5:17 
GeneralRe: How to bind the ComboBox which is in a ListView using collection Pin
DavJes25-Aug-10 5:09
DavJes25-Aug-10 5:09 
GeneralRe: How to bind the ComboBox which is in a ListView using collection Pin
Ian Shlasko25-Aug-10 5:53
Ian Shlasko25-Aug-10 5:53 
AnswerRe: How to resolve duplicated ResourceDictionary? Pin
Abhinav S24-Aug-10 5:21
Abhinav S24-Aug-10 5:21 
QuestionSerialize WPF and telerik controls [modified] Pin
michalush8523-Aug-10 20:39
michalush8523-Aug-10 20:39 
AnswerRe: Serialize WPF and telerik controls Pin
souidi abderrahman24-Aug-10 1:13
souidi abderrahman24-Aug-10 1:13 
QuestionGetting the value of Height through OneWayToSource binding Pin
la0123-Aug-10 14:50
la0123-Aug-10 14:50 
I have a ListBox whose Height is bound one way to source. As you can see from the XAML below, the listbox is supposed to take up all the space available to it, and it's height is not initialised to anything in C# code.
<Grid>
    <Grid.RowDefinitions>
         <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <ListBox ItemsSource="{Binding PhotoList}" Grid.Row="0" Height="{Binding Path=listBoxH, Mode=OneWayToSource}">

    </ListBox>
</Grid>


My problem is that I need to get a numerical value for listBoxH in the code behind (bounded code, it's actually the ViewModel of my UI). But this value is double.NaN. This is expected as the Height/listBoxH is not "set" anywhere, but is there a way to get the ActualHeight of the ListBox?

I need to get the current height of the ListBox, use it do a calculation which decides what to display in the ListBox.

I can't directly reference the ListBox in C# code as it doesn't belong to the same class, and this is not the approach I want to take.

Workarounds, anyone?
AnswerRe: Getting the value of Height through OneWayToSource binding Pin
AspDotNetDev27-Aug-10 11:14
protectorAspDotNetDev27-Aug-10 11:14 
GeneralRe: Getting the value of Height through OneWayToSource binding Pin
la0129-Aug-10 15:24
la0129-Aug-10 15:24 
QuestionHow to cache data at WPF after the application closed? Pin
michalush8522-Aug-10 4:49
michalush8522-Aug-10 4:49 
AnswerRe: How to cache data at WPF after the application closed? Pin
Pete O'Hanlon22-Aug-10 5:04
mvePete O'Hanlon22-Aug-10 5:04 
GeneralRe: How to cache data at WPF after the application closed? Pin
michalush8522-Aug-10 5:18
michalush8522-Aug-10 5:18 
GeneralRe: How to cache data at WPF after the application closed? Pin
Pete O'Hanlon22-Aug-10 5:26
mvePete O'Hanlon22-Aug-10 5:26 
GeneralRe: How to cache data at WPF after the application closed? Pin
michalush8522-Aug-10 20:03
michalush8522-Aug-10 20:03 
GeneralRe: How to cache data at WPF after the application closed? Pin
Pete O'Hanlon22-Aug-10 20:09
mvePete O'Hanlon22-Aug-10 20:09 
GeneralRe: How to cache data at WPF after the application closed? [modified] Pin
michalush8522-Aug-10 20:29
michalush8522-Aug-10 20:29 
GeneralRe: How to cache data at WPF after the application closed? Pin
Pete O'Hanlon22-Aug-10 21:40
mvePete O'Hanlon22-Aug-10 21:40 
GeneralRe: How to cache data at WPF after the application closed? Pin
michalush8522-Aug-10 22:24
michalush8522-Aug-10 22:24 
Questionviewing xml data in wpf [modified] Pin
Sonar8721-Aug-10 20:20
Sonar8721-Aug-10 20:20 
AnswerRe: viewing xml date in wpf Pin
Pete O'Hanlon21-Aug-10 21:03
mvePete O'Hanlon21-Aug-10 21:03 
GeneralRe: viewing xml date in wpf [modified] Pin
Sonar8721-Aug-10 22:46
Sonar8721-Aug-10 22:46 
GeneralRe: viewing xml date in wpf Pin
Pete O'Hanlon22-Aug-10 2:54
mvePete O'Hanlon22-Aug-10 2:54 
QuestionRe: viewing xml data in wpf Pin
Sonar8722-Aug-10 18:09
Sonar8722-Aug-10 18:09 
AnswerRe: viewing xml data in wpf Pin
Pete O'Hanlon22-Aug-10 20:08
mvePete O'Hanlon22-Aug-10 20:08 

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.