I'am doing localized application in WP7 so I make my app bar in code. The problem appears when I have some form (registration, login etc.). In Blend everything looks all right, but when I emulate it on device my gird with textboxes, textblocks is totally different (sometimes they are on each other)
My solution is to build empty app bar in Blend (PhoneApplicationPage -> New (Common Properties)) and then make new one in code like that:
private void BuildApplicationBar()
{
// Set the page's ApplicationBar to a new instance of ApplicationBar.
ApplicationBar = new ApplicationBar();
// Create a new button and set the text value to the localized string from AppResources.
ApplicationBarIconButton OkAppBarButton = new ApplicationBarIconButton(new Uri("icons/ok.png", UriKind.Relative));
OkAppBarButton.Text = AppResource.OkAppBarButton;
ApplicationBar.Buttons.Add(OkAppBarButton);
OkAppBarButton.Click += new EventHandler(OkAppBarButton_Click);
ApplicationBarIconButton CancelAppBarButton = new ApplicationBarIconButton(new Uri("icons/cancel.png", UriKind.Relative));
CancelAppBarButton.Text = AppResource.CancelAppBarButton;
ApplicationBar.Buttons.Add(CancelAppBarButton);
CancelAppBarButton.Click += new EventHandler(CancelAppBarButton_Click);
}
Works good, but I wanted just to be sure is that the proper way to handle with that?