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 4005516
In Process

The Archive Base Latest Questions

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

In my WP7 app I want to update the ApplicationTitle string on all pages

  • 0

In my WP7 app I want to update the ApplicationTitle string on all pages at the same time, when something is changed. I’ve searched for ways of doing it, and people talk about using databinding and the INotifyPropertyChanged interface. However, using the samples i’ve found, I cannot make it work. I suspect the binding to be wrong, but haven’t been able to spot the error.

I have a class called “RegistrationQueue” which has the following code:

    public void Gem()
    {
        var settings = IsolatedStorageSettings.ApplicationSettings;

        if (settings.Contains("regqueue"))
        {
            settings["regqueue"] = _registreringsListe;
        }
        else
            settings.Add("regqueue", _registreringsListe);

        AppTitle = "LOGIMATIC A/S - " + _registreringsListe.Count + " registreringer i kø";
    }

And this:

    private string _AppTitle;

    // Declare the PropertyChanged event.
    public event PropertyChangedEventHandler PropertyChanged;

    // Create the property that will be the source of the binding.
    public string AppTitle
    {
        get { return _AppTitle; }
        set
        {
            _AppTitle = value;
            // Call NotifyPropertyChanged when the source property 
            // is updated.
            NotifyPropertyChanged("AppTitle");
        }
    }


    // NotifyPropertyChanged will raise the PropertyChanged event, 
    // passing the source property that is being updated.
    public void NotifyPropertyChanged(string propertyName)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this,
                new PropertyChangedEventArgs(propertyName));
        }
    }

Which is basicly a copy/paste from MSDN as far as I can remember.

In one of my XAML pages I’ve written this:

<TextBlock x:Name="ApplicationTitle" Text="{Binding AppTitle, Mode=OneWay}" Style="{StaticResource PhoneTextNormalStyle}" />

And I thought it would work, but it does not. What am I doing wrong here?

Full XAML for the page:

<phone:PhoneApplicationPage 
    x:Class="FotoDokUdkast.loginScreen"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    shell:SystemTray.IsVisible="True" d:DesignHeight="696" d:DesignWidth="480">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Black">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <!--<TextBlock x:Name="ApplicationTitle" Text="LOGIMATIC A/S" Style="{StaticResource PhoneTextNormalStyle}"/>-->
            <TextBlock x:Name="ApplicationTitle" Text="{Binding Path=AppTitle, Mode=OneWay}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="FotoDok 0.5b " Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" Background="Black">
            <TextBlock Height="30" HorizontalAlignment="Left" Margin="6,6,0,0" Name="textBlock1" Text="Et Logimatic program" VerticalAlignment="Top" Width="444" />
            <toolkit:ListPicker Name="pickerProject" Margin="9,42,15,0" Header="Vælg projekt" ListPickerMode="Normal" ItemCountThreshold="0" FullModeHeader="Vælg projekt" Height="97" VerticalAlignment="Top" />
            <Button Content="Log ind" Height="72" HorizontalAlignment="Left" Margin="6,337,0,0" Name="btnLogin" VerticalAlignment="Top" Width="444" Click="btnLogin_Click" />
            <toolkit:ListPicker Header="Vælg bruger" Margin="9,145,15,292" Name="pickerUser" ListPickerMode="Normal" ItemCountThreshold="0" FullModeHeader="Vælg bruger" />
        </Grid>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="Images/appbar.sync.rest.png" Text="Opdater projekter" Click="ApplicationBarIconButtonOpdater_Click"/>
            <shell:ApplicationBarIconButton IconUri="Images/appbar.delete.rest.png" Text="Slet projekter" Click="ApplicationBarIconButtonSlet_Click"/>
            <shell:ApplicationBarIconButton IconUri="Images/appbar.feature.email.rest.png" Text="Registreringer i kø" Click="ApplicationBarIconButtonRegistrering_Click"/>
            <shell:ApplicationBarIconButton IconUri="Images/appbar.feature.settings.rest.png" Text="Tilpas opsætning" Click="ApplicationBarIconButtonSettings_Click"/>

        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>

I’ve then written “DataContext = “RegistreringsKø”; ” in the constructor for the XAML page (loginscreen.cs)

  • 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-20T08:24:11+00:00Added an answer on May 20, 2026 at 8:24 am

    I can’t see anything wrong with what you have posted so far. My guess would be that the DataContext current for where the TextBlock is sited is not an instance of the class that has this AppTitle property. Hence the binding doesn’t work not because it can’t find the AppTitle property.

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

Sidebar

Related Questions

I am working on a wp7 app and I want to make an https
I want to make some buttons in my app that look like the common
I have a simple Silverlight app that I want to run on Windows Phone
I'm developing a WP7 app and the application needs to change the icon of
I'm working on a WP7 app. The app will have a couple of XML
As part of my first WP7 app, I'm giving the user configuration options to
to be honest, I am kind of lazy at the moment. I tried a
I have created a very basic service operation that needs to write content to
I have a service called myService.svc. This service is exposed using a webHttpBinding binding.
How can I find out if a DLL that was created for a desktop

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.