Arun
Arun

Reputation: 3456

Issue about to start developing an application in windows phone 7

I am about to start developing an application in windows phone 7. But I have a doubt in some points.

enter image description here

This is the GUI format of the application. The application have many pages.

In first section there are 3 buttons and no change for their design in entire application. In iPhone I used the UINavigationBar control. But is there any control in windows phone like UINavigationBar in iPhone ?

In second section the content is always changing.

In third section there are some buttons. But the buttons functionality is different in different pages. And also need to remove or add extra buttons in some pages. In iPhone I used UITabBar control.

Which way I can start the app development efficiently ?. Can anyone please suggest controls or idea I can use here in windows phone for this purpose ?

Thanks.

Upvotes: 1

Views: 104

Answers (3)

Matt Lacey
Matt Lacey

Reputation: 65586

It seems you're trying to build a Windows PHone app the way you would an iPhone app. This typically leads to a very poor experience on Windows Phone and leads to users becoing frustrated as the app doesn't behave in the same way as other apps on the platform (and therefore the way they expect your app to behave).

I'd recommend starting by looking at some Design Resources for Windows Phone before designing your app so you can build something appropriate to the platform.

A couple of pointers:
- In general, floating buttons on [the top of] a page look bad. This is not the way apps on the platform perform navigation (unlike iOS). Windows Phone apps should use a "hub and spoke" model for page navigation.
- Having contents cahnge within a page is likely to lead to some confusion about the expected behaviour of the back button. Be very careful about this as inconsistent, unpredictable or non-standard back button behaviour can cause an application to fail certification.

Upvotes: 3

alfah
alfah

Reputation: 2085

How abt a Pivot? It might suit your needs. Techinically pivot is used to show the same data in different ways.

MSDN

Upvotes: 1

Martin Liversage
Martin Liversage

Reputation: 106936

If you don't want to create an application where the user can navigate from page to page (and use the back button to go back) you can create an application based on a single page. Here is a somewhat modified version of what Visual Studio creates for you if you create a Windows Phone Application project.

    <phone:PhoneApplicationPage 
        x:Class="PhoneApp1.MainPage"
        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"
        mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="728"
        FontFamily="{StaticResource PhoneFontFamilyNormal}"
        FontSize="{StaticResource PhoneFontSizeNormal}"
        Foreground="{StaticResource PhoneForegroundBrush}">

        <Grid Background="Transparent">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
            </Grid.RowDefinitions>

            <StackPanel Margin="12,17,0,28">
                <TextBlock
                    Text="MY APPLICATION"
                    Style="{StaticResource PhoneTextNormalStyle}"/>
                <TextBlock
                    Text="page name"
                    Margin="9,-7,0,0"
                    Style="{StaticResource PhoneTextTitle1Style}"/>
            </StackPanel>

            <Grid Grid.Row="1" Margin="12,0,12,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition/>
                </Grid.RowDefinitions>

                <!-- The three buttons -->
                <StackPanel Orientation="Horizontal">
                    <Button Content="Button 1"/>
                    <Button Content="Button 2"/>
                    <Button Content="Button 3"/>
                </StackPanel>

                <!-- The main content -->
                <TextBlock Grid.Row="1"
                    Text="Content always changing"
                    Style="{StaticResource PhoneTextTitle1Style}"
                    TextWrapping="Wrap"
                    TextAlignment="Center"/>

            </Grid> 
        </Grid>

        <phone:PhoneApplicationPage.ApplicationBar>
            <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
                <shell:ApplicationBarIconButton
                    IconUri="/Images/appbar_button1.png"
                    Text="Button 1"/>
                <shell:ApplicationBarIconButton
                    IconUri="/Images/appbar_button2.png"
                    Text="Button 2"/>
                <shell:ApplicationBar.MenuItems>
                    <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                    <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
                </shell:ApplicationBar.MenuItems>
            </shell:ApplicationBar>
        </phone:PhoneApplicationPage.ApplicationBar>

    </phone:PhoneApplicationPage>

And here is how it looks in the designer:

Sample Windows Phone 7 application

In this case the main content (that is always changing) is a <TextBlock> but you can use a panel composed of other controls or a UserControl. If you put multiple panels/controls in the same grid cell you can completely change the layout by hiding all but one panel/control.

For the top row of buttons I have used a horizontal <StackPanel> but you may want to use something else for better control of the layout and alignment.

For the bottom row of buttons you should use the appbar which is part of the standard Windows Phone 7 user experience.

Upvotes: 1

Related Questions