|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
WPF and codeBehind file problem....<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="31,10,39.0000000000001,17" Width="Auto" Height="Auto" x:Name="Button" Content="Get Photos" RenderTransformOrigin="-0.462962962962963,-0.40625" Grid.ColumnSpan="1" Grid.RowSpan="1" Command="{Binding GetDataCommand, Mode=Default, Source={StaticResource PhotosCollectionDS}}"> <Button.RenderTransform> <TransformGroup> <TranslateTransform X="0" Y="0"/> <ScaleTransform ScaleX="1" ScaleY="1"/> <SkewTransform AngleX="0" AngleY="0"/> <RotateTransform Angle="0"/> <TranslateTransform X="0" Y="0"/> <TranslateTransform X="0" Y="0"/> </TransformGroup> </Button.RenderTransform> </Button> <ListBox HorizontalAlignment="Stretch" Margin="12,21,12,10" Width="Auto" x:Name="ListBox" Grid.Row="1" Grid.ColumnSpan="1" ItemsSource="{Binding Photos, Mode=Default, Source={StaticResource PhotosCollectionDS}}" ItemTemplate="{DynamicResource PhotosTemplate}"/> Then I have tried to modify this using Visual Studio so that the Click event is handled in the codebehind file <Button.... Click="OnButtonClick">.....</Button> I have done some debugging and the dataset is populated with the correct information and the code that populates the listBox is executed but the images are not shown in the window.... This brings me to a conclusion that I am doing a stupid mistake... Any ideas what might be that mistake.... Are there maybe some events that I need to fire in the codebehind file that would cause the listbox to be updated with the images fetched? Thanks, Marko Vuksanovic |
|||||||||||||||||||||||