Is it possible to add textBlock to windows phone 7 Applicationbar - windows-phone-7

In my ebook app, I wanted to show current page number as as textBlock on Application bar.
I couldn't find a way to add textBlock to the application bar.

Unfortunately you cannot modify the application bar itself. To build something like you'd need to create your own application bar style control.
I'm not entirely sure if this is a good thing because it would be inconsistent with the rest of the phone and could possibly violate some style guides.

You can also check this: Bindable Application Bar Extensions for Windows Phone 7

Related

How to use a horizontal WrapPanel in Panorama (sketchflow)

I would like to use a horizontal WrapPanel in my application (like the People Hub). However, I have to start with a SketchFlow project.
My question is: how can I do?
In fact, I saw that I had to add the dll to my project but how do next? If I extend my panoramaitem, rendering is not pretty (the second item does not move).
Screenshot http://upload.yamalandia.com/rep1/247871330688.PNG
In this picture you can see how it looks: it's not nice.
Could you post the xaml?
Just to verify, you added a reference to the SL toolkit dll from the SL version (not the Windows Phone version, as you are actually creating a SL app in SketchFlow).
If that control in the screenshot is the wrap panel, you could set it to an explicit size to fix the problem most likely.

Changing the Application Icon, Splash Screen etc through code in Windows Phone

Is it possible to change Application Icon, Splash screen etc through code, My requirement is i need to change these items after reaching a specific date say (jan-21-2012). Is there any provision present change these contents through code?
No, you cannot change these through code. These components of your application are specified via the manifest file. Regarding the Application Icon, you can have a 'live tile' for your application which is dynamic and can be changed. See MSDN:
How to: Create, Delete, and Update Tiles for Windows Phone
Maybe this blogpost about the dynamic splashscreen can help you?
http://windowsphonegeek.com/articles/All-about-Splash-Screens-in-WP7-ndash-Creating-animated-Splash-Screen
I don't think you can change the application icon this way. Do you have to change the icons multiple times through the year? Or is it one rebranding action? In that case i would suggest submit it with the new icons/splashscreen to the marketplace when you want it to change.
Here there are couple of articles about changing Splash screen:
Creating Animated Splash screen in Windows Phone7
Windows Phone 7 better Splash screen
You can extend techincs from articles above and implement your functionality.
Regarding to "Icon" use well known WP feature - Live Tiles (nice links in answers above).

Windows Phone 7 - Possible to Put Textbox in Application Bar?

I want to create an application bar like IE has in Windows Phone 7.1 ... it has a textbox in it instead of buttons, and it still works as the application bar with menu items under it.
Is this possible. I don't see anything under the Shell namespace, and just adding a Grid to the Application bar is not working.
No, the application bar is not derived from UIElement. So you cannot add other UIElements to it.
The closest you can get is to add a Grid along the bottom of your phone screen, color it like the application bar and add a TextBlock to it. I wouldn't recommend this approach though, because it makes your app non-standard compared to all other apps available for the platform.
If you are to go this route, you can use the PhoneChromeBrush theme resource to set the color to match the application bar.

WP7 - Text Button on the Application Bar

On Windows Phone 7, go to Settings, email & accounts, add an account, the Windows Live (or any other). Note at the bottom there is the gray panel with a rectangular [sign in] button. Click in the email address field, and the on screen keyboard pops up ABOVE the gray panel. Rotate the phone, and the gray panel does not rotate, although the page does. That gray panel is the Application Bar, is it not?
I only find docs for adding an icon-based round button (and menu items). How do we put a rectangular textual button on the Application Bar?
Adding buttons in the Application Bar is not supported for third party developers. The Application Bar itself is not a Silverlight control; it's a native one. Only OEMs, certain partners and MS have access to the native SDK, so you won't be able to template the Application Bar to have buttons. Of course, you could create your own Application Bar that mimics the real one, but I don't recommend that approach as it would be very tricky to get it exactly right and be consistent between apps.
Yes, that's the application bar. Well, it's the non Silverlight version of it. (The built in apps are not built with Silverlight.)
Unfortuanately it is not possible to use text buttons on the application bar. It's only possible to use buttons with images.
Yes it would be nice/useful in a number of situations but it's just not possible with the current SDK (even Mango). I keep hoping it'll be there in a future version...
The applications that come with the phone are not restricted to using developer APIs and the one you mention likely uses C++ and / or restricted APIs. As a third-party developer your only option is to stick with icons on the application bar.
You can always create a Panel colored like the application bar, aligned along the bottom of the screen and display buttons or whatever other UI element you want to.

How to add an application bar to a user control in wp7

I have built a wizard style user control that lets you add stackpanel based pages and flick between them.
I would like to add an application bar as part of the user control with next and previous buttons that enable/disable based on page displayed etc.
Application bar appears to be an attached property of PhoneApplicationPage. I have tried referencing Microsoft.Phone.Shell but get invalid type.
Any ideas how I can add it to my user control?
Application bar is such a pain in the a**. This control is not a Silverlight one but a native one. Maybe you can be more lucky with this solution:
http://blog.humann.info/post/2010/08/27/How-to-have-binding-on-the-ApplicationBar.aspx
The ApplicationBar is a service that is provided by the operating system, i.e. not part of the Framework, and can only be used at the page-level, not in your UserControl. In addition, the ApplicationBar does not support regular bindings as you've seen. As mentioned above there are a number of solutions that provide workarounds for this problem.
Alternatively, you could use the ApplicationBarButtonCommand and ApplicationBarButtonNavigation behaviors from the Silverlight Windows Phone Toolkit. It's a simple enough task to create your ApplicationBarMenuCommand if you need one.

Resources