Reputation: 23
i just start developping windows phone apps through using silverlight & windows phone SDK 7.1 frameworks and while i am open a new project for developping an App[lication] bar i noticed that i need a reference [Microsoft.Phone.Shell] well .. i try to add it .. after a multiple of effort of searching i see that i didn't have the .Dll file → [Microsoft.Phone.Shell.dll] in the directory of my installed .Dll files .. so Plz my friends i need an answer or a hint to complete that app ....
Upvotes: 1
Views: 1478
Reputation: 89285
What you need to do to be able to use Application Bar are:
Microsoft.Phone.dll
Add following two namespaces
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
Then you can use the application bar :
<phone:PhoneApplicationPage
...
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
...
>
...
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True">
<shell:ApplicationBarIconButton IconUri="/Images/button1.png" Text="Button 1"/>
<shell:ApplicationBarIconButton IconUri="/Images/button2.png" Text="Button 2"/>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>
Upvotes: 3