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

WPF

 
GeneralRe: Vertical/Horizontal scrollbar for silverlight page Pin
Sunil P V30-Jun-09 22:16
Sunil P V30-Jun-09 22:16 
QuestionCatastrophic failure while running thread with BackgroundWorker Pin
salon22-Jun-09 2:31
salon22-Jun-09 2:31 
GeneralRe: Catastrophic failure while running thread with BackgroundWorker Pin
Viral Upadhyay22-Jun-09 3:03
Viral Upadhyay22-Jun-09 3:03 
GeneralRe: Catastrophic failure while running thread with BackgroundWorker Pin
salon22-Jun-09 3:14
salon22-Jun-09 3:14 
GeneralRe: Catastrophic failure while running thread with BackgroundWorker Pin
Viral Upadhyay22-Jun-09 4:31
Viral Upadhyay22-Jun-09 4:31 
GeneralRe: Catastrophic failure while running thread with BackgroundWorker Pin
salon22-Jun-09 19:11
salon22-Jun-09 19:11 
GeneralRe: Catastrophic failure while running thread with BackgroundWorker Pin
salon22-Jun-09 21:16
salon22-Jun-09 21:16 
QuestionListBox Binding From Within A User Control Pin
BlitzPackage21-Jun-09 14:56
BlitzPackage21-Jun-09 14:56 
Good people,

I have a listbox embedded within a user control.   The user control is then housed within a data template.   I have created a dependency property for the user control; the type of this property is an observable collection that is intended to be the source of items for the listbox.

The difficulty I am having is that the listbox will not display the items when the user control is part of the datatemplate.   It will display items when it is not part of the data template.   I am pasting code below.   Any help, advice or information would be really helpful.   Thanks in advance.

Here is the code for the list box as it is in the user control.
<pre>
<ListBox SelectionChanged="ListBoxImages_SelectionChanged" IsSynchronizedWithCurrentItem="True" Margin="8,40.76,8,174.91" x:Name="ListBoxImages" Grid.Row="1" ItemsSource="{Binding Path=Photos, ElementName=UCAscensionImageManagement, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ItemTemplate="{DynamicResource DataTemplateImageList}">
          </ListBox>
</pre>

This is the user control, that contains the listbox.   It is in a datatemplate.
<pre>
<SG2_Ascension:UserControlAscensionImageManagement Margin="21.234,0,17.733,54" VerticalAlignment="Bottom" Height="475" x:Name="UCAIMEventPhotos" Width="615" Photos="{Binding Path=UCGeneralDataSeries, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

Finally, this is the dependency property as it is coded in the user control
<pre>
public static DependencyProperty PhotosProperty = DependencyProperty.Register(
                  "Photos", typeof(GeneralDataSeries), typeof(UserControlAscensionImageManagement)/*,
                  new FrameworkPropertyMetadata(new PropertyChangedCallback(OnRatingChanged))*/
                                                                                                                                    );
            /// <summary>
            /// Photo objects.
            /// </summary>
            public GeneralDataSeries Photos
            {
                  get
                  {
                        return (GeneralDataSeries)GetValue(PhotosProperty);
                  }
                  set
                  {
                        SetValue(PhotosProperty, value);
                  }
            }
</pre>

Again, any help would be greatly appreciated.
AnswerRe: ListBox Binding From Within A User Control Pin
Mark Salsbery21-Jun-09 16:38
Mark Salsbery21-Jun-09 16:38 
GeneralRe: ListBox Binding From Within A User Control Pin
BlitzPackage21-Jun-09 17:08
BlitzPackage21-Jun-09 17:08 
QuestionRe: ListBox Binding From Within A User Control Pin
Mark Salsbery21-Jun-09 17:45
Mark Salsbery21-Jun-09 17:45 
AnswerRe: ListBox Binding From Within A User Control Pin
BlitzPackage21-Jun-09 17:55
BlitzPackage21-Jun-09 17:55 
GeneralRe: ListBox Binding From Within A User Control Pin
Mark Salsbery21-Jun-09 18:01
Mark Salsbery21-Jun-09 18:01 
QuestionHow do I check whether the "X" button in the top right corner was clicked on a WPF form? Pin
Etienne_12321-Jun-09 11:54
Etienne_12321-Jun-09 11:54 
AnswerRe: How do I check whether the "X" button in the top right corner was clicked on a WPF form? Pin
Christian Graus21-Jun-09 12:10
protectorChristian Graus21-Jun-09 12:10 
QuestionHow do you display separator bars in a StatusBar? Pin
fjparisIII21-Jun-09 8:27
fjparisIII21-Jun-09 8:27 
AnswerRe: How do you display separator bars in a StatusBar? Pin
Christian Graus21-Jun-09 10:05
protectorChristian Graus21-Jun-09 10:05 
GeneralRe: How do you display separator bars in a StatusBar? Pin
fjparisIII21-Jun-09 11:09
fjparisIII21-Jun-09 11:09 
GeneralRe: How do you display separator bars in a StatusBar? Pin
Mark Salsbery21-Jun-09 11:13
Mark Salsbery21-Jun-09 11:13 
GeneralRe: How do you display separator bars in a StatusBar? (Ans: don't use them) Pin
fjparisIII21-Jun-09 11:26
fjparisIII21-Jun-09 11:26 
GeneralRe: How do you display separator bars in a StatusBar? (Ans: don't use them) Pin
Mark Salsbery21-Jun-09 11:29
Mark Salsbery21-Jun-09 11:29 
GeneralRe: How do you display separator bars in a StatusBar? (Ans: don't use them) Pin
fjparisIII21-Jun-09 11:51
fjparisIII21-Jun-09 11:51 
AnswerRe: How do you display separator bars in a StatusBar? [modified] Pin
Mark Salsbery21-Jun-09 10:50
Mark Salsbery21-Jun-09 10:50 
GeneralRe: How do you display separator bars in a StatusBar? Pin
Christian Graus21-Jun-09 10:51
protectorChristian Graus21-Jun-09 10:51 
GeneralRe: How do you display separator bars in a StatusBar? Pin
Mark Salsbery21-Jun-09 11:04
Mark Salsbery21-Jun-09 11:04 

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.