Global Application Bar Global Application Bar
Danke Danke:  0
Ergebnis 1 bis 3 von 3
  1. Hallo!

    Wie kann ich in einer Global Application Bar Navigieren?

    Ok eine Global Application Bar erstellen ist nicht schwer, einfach in der App.xaml das einfuegen

    Code:
    <Application.Resources>
            <shell:ApplicationBar x:Name="globalApplicationBar" x:Key="globalApplicationBar" Opacity="0.7">
                <shell:ApplicationBar.MenuItems>
                    <shell:ApplicationBarIconButton x:Name="homebutton" IconUri="/Images/appbar_button1.png" Text="Home" Click="homebutton_Click"/>
                    <shell:ApplicationBarIconButton x:Name="liveprogrammbutton" IconUri="/Images/appbar_button2.png" Text="Live Program" Click="liveprogrammbutton_Click"/>
                    <shell:ApplicationBarIconButton x:Name="videosbutton" IconUri="/Images/appbar_button2.png" Text="Videos" Click="videosbutton_Click"/>
                    <shell:ApplicationBarIconButton x:Name="morebutton" IconUri="/Images/appbar_button2.png" Text="More" Click="morebutton_Click"/>
                </shell:ApplicationBar.MenuItems>
            </shell:ApplicationBar>
        </Application.Resources>
    So nun fehlen nch die Events, aber die definiert man einfach in der App.xaml.cs

    Code:
     void morebutton_Click(object sender, EventArgs e)
            {
    this.navigationService.Navigate(new Uri("/More.xaml", UriKind.Relative));
            }
    So, hier tut sich aber ein Problem auf. in der App.cs gibt es keinen NavigationService, weil die seite ja von Application ableitet und nicht wie auf einer Page, von PhoneApplicationPage.

    Ich versuchte auch schon einen NavigationService zu instanzieren, allerdings funktioniert das auch nicht, weil
    Code:
    Error    1    The type 'System.Windows.Navigation.NavigationService' has no constructors defined    C:\Users\Outlaw\Documents\Visual Studio 2010\Projects\WindowsPhoneApplication3\WindowsPhoneApplication3\App.xaml.cs    133    35    WindowsPhoneApplication3
    Hat jemand eine Idee, wie ich durch eine globale Application Bar durch Seiten navigieren kann?
    0
     

  2. Hallo Outlaw,

    du musst im jeweiligen XAML deiner Sub-Pages natürlich auch die Deklaration deiner GlobalApplicationBar als als StaticResource setzen!

    Beispiel:

    <phonehoneApplicationPage
    ...
    ApplicationBar="{StaticResource globalApplicationBar}">

    Diese Zeile ist die, auf die es ankommt!

    Hoffe Dir damit geholfen zu haben.
    0
     

  3. 28.10.2010, 20:39
    #3
    Ich glaube sein Problem ist nicht das einbinden im Xaml, sondern dass der Navigation Service in der app.xaml.cs nicht verfügbar ist.

    Versuchs mal damit (ungestest, habs aus nem Blog):
    PhoneApplicationFrame root = Application.Current.RootVisual as PhoneApplicationFrame;
    root.Navigate(new Uri("/NextPage.xaml", UriKind.Relative));
    0
     

Ähnliche Themen

  1. Navilösung „Global Navigator 5.5“?
    Von Unregistriert im Forum HTC Touch Pro 2
    Antworten: 0
    Letzter Beitrag: 29.10.2009, 16:04
  2. Global Adress List - Exchange
    Von zehzhan im Forum HTC Hero
    Antworten: 3
    Letzter Beitrag: 31.08.2009, 19:04
  3. Youtube application
    Von Phill92 im Forum HTC Touch Cruise
    Antworten: 2
    Letzter Beitrag: 07.09.2008, 14:50

Besucher haben diese Seite mit folgenden Suchbegriffen gefunden:

wp7 application bar

the type System.Windows.Navigation.NavigationService has no constructors defined

error 1 the type system.windows.navigation.navigationservice has no constructors defined

app.xaml.cs navigationservice

wp7 applicationbar

ApplicationBar navigation

wp7 app.xaml.cs

System.Windows.Navigation.NavigationService has no constructors defined

windows phone 7 navigation bar

global application bar windows phone

app.xaml.cs navigation

NavigationService app.xaml.cs

wp7 applicatonbar

cs xamp application bar wp7

windows phone global appbar navigationservice

wp7 navigationservice has no constructors definedwp7 ressources einbindenphone applicationbarapplicationbar links xaml windows phone 7applicationbar windows phone namewp7 applicationbar in app.xaml eventnavigation bar app funktioniert nichtwindows phone 7 application barwp7 applicationbar app.xaml

Stichworte