Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3975058
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:38:24+00:00 2026-05-20T04:38:24+00:00

I have built a view model and the listbox binds to the ObervableCollection, but

  • 0

I have built a view model and the listbox binds to the ObervableCollection, but a textbox I am using for a temp url wont bind and return data. I am not getting any errors either on compile or run

ViewModel:

public class HomepageModel:INotifyPropertyChanged
{
    public TextBlock bgrImg{get;set;}
    public ObservableCollection<MenuItem> menu {get; private set;}

    public HomepageModel()
    {
        this.menu = new ObservableCollection<MenuItem>();
    }

    public void Load()
    {
        bgrImg = new TextBlock();
        bgrImg.Text = "/Windows7MobileClient;component/Images/Desert.jpg";
        //bgrImg = ;
        menu.Add(new MenuItem("Feed",""));
        menu.Add(new MenuItem("Messages",""));
        menu.Add(new MenuItem("Media",""));
        menu.Add(new MenuItem("Favourites",""));
        menu.Add(new MenuItem("Freinds",""));
    }

    public event PropertyChangedEventHandler PropertyChanged;
    private void NotifyPropertyChanged(String propertyName)
    {
        PropertyChangedEventHandler handler = PropertyChanged;
        if (null != handler)
        {
            handler(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}

Homepage.xaml

<controls:PanoramaItem Header="menu">
            <Grid>
                <TextBlock Text="{Binding bgrImg}"/>
                <ListBox x:Name="FirstListBox" Margin="0,0,-12,0" ItemsSource="{Binding menu}" MouseLeftButtonUp="FirstListBox_MouseLeftButtonUp" >
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17" Width="432">
                                <TextBlock Text="{Binding label}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </Grid>
        </controls:PanoramaItem>

I eventual want to use the string for the panorama background image. Sorry if this seems realy obviously simply.

Chris

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:38:25+00:00Added an answer on May 20, 2026 at 4:38 am

    You need to call NotifyPropertyChanged() in your setters for the items you wish to bind to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using: Rails 3.1.1 I have a controller/model/view called Category that is built up on
I currently have a DetailView for Django's built-in User . url( r'^users/(?P<pk>\d+)/$', DetailView.as_view( model
I have built a base class for my view model(s). Here is some of
I'm new to Prism, but I have successfully built several WPF/Mvvm-Light applications. I'm using
I have a view which I built in Interface builder with a tableview and
Let's say I have a PHP Model-View-Controller framework that maps an address like http://example.com/admin/posts/edit/5
I have a profile model I use to supplement the built in User model.
I have need of a view model that tracks changes so the user can
I have a small problem with UINavigationController animation between two view. My application build
I have built a simple menu in jQuery http://vanquish.websitewelcome.com/~toberua/ Here is a sample of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.