CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

How to "connect" Views and ViewModels using a HyperLink in SL Navigation?

rated by 0 users
Not Answered This post has 0 verified answers | 0 Replies | 0 Followers

Top 100 Contributor
68 Posts
superkuton posted on Mon, Jun 11 2012 6:30 AM

I am trying to use a theme for a Silverlight project which uses the SL Navigation Framework, thus I have a Page, a View and a ViewModel.

I have a hyperlink which "calls" the page:

<HyperlinkButton Content="HyperlinkButton" 
                         Name="hyperlinkButton1" NavigateUri="Testing/SampleListView"
                         VerticalAlignment="Top" Width="100" />

 

I have a view which instantiates the ViewModel with the following code:

    <navigation:Page.DataContext>
        <my:SampleListViewModel />
    </navigation:Page.DataContext>

I have set the following CVS in the view:

<UserControl.Resources>
        <CollectionViewSource x:Key="sampleListViewModelViewSource" d:DesignSource="{d:DesignInstance my:sampletListViewModel, CreateList=True}" />
        <CollectionViewSource x:Key="sampleListInfoViewModelModelViewSource" Source="{Binding Path=ItemList, Source={StaticResource sampleListViewModelViewSource}}" />
    </UserControl.Resources>

 

When I break through the viewmodel, it contains the data "fetched" but it is not displaying in my view. Using the same View and ViewModel, and Bxf, I am able to display the data in the view. I just can not get it to work in the SL Navigation Framework. I just wonder what am I doing wrong.

Any help is appreciated. Thanks.

Page 1 of 1 (1 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems