Windows Phone App development attempt (2)

Source: Internet
Author: User

Today, I wrote a small application, like the previous one, the application itself has no practical value, the only use is to practice practiced hand. Bo is a small white, written on the blog is hoping to communicate with you to share, learn from each other.

The application content is introduced by using Pivot control (recently learning this control), combined with local pictures, text to briefly introduce China, the United States, Japan, Russia, Germany and several countries.

In the process of making this small software, mainly encountered two problems, one is the pivot navigation font size and font type of the problem (personally think the default font is not beautiful, the default font is too large and uncoordinated), there is a problem is to upload the picture into the page. For these two questions, I focus on the font and size problems, upload pictures can refer to my last source code.

Drag the pivot control to generate the default code for;

        <PivotTitle= "Pivot">            <PivotItemHeader= "PivotItem 0">                <Grid/>            </PivotItem>            <PivotItemHeader= "PivotItem 1">                <Grid/>            </PivotItem>        </Pivot>

If using the default code, it is difficult to modify the font, I tried a lot of methods have not changed, and finally adopted the following code, successfully modified the font and size.

        <PivotTitle= "Pivot">            <PivotItem>                <Pivotitem.header>                    <TextBlockText= "PivotItem0"FontFamily= "Song Body"FontSize= " the"/>                </Pivotitem.header>            </PivotItem>        </Pivot>

Finally, all the source code to serve:

<Pagex:class= "Pivot application. MainPage "xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local= "Using:pivot Application"xmlns:d= "http://schemas.microsoft.com/expression/blend/2008"XMLNS:MC= "http://schemas.openxmlformats.org/markup-compatibility/2006"mc:ignorable= "D"Background= "#FF4F545F" >    <Grid>        <Pivot>            <PivotItem>                <Pivotitem.header>                    <TextBlockText= "Chi"FontFamily= "Song Body"/>                </Pivotitem.header>                <GridMargin= "0,0,0,0">                    <StackPanelMargin= "0,0,0,400">                        <ImageSource= "Assets\chi.jpg"/>                    </StackPanel>                    <TextBlockText= "China", located in East Asia, is a unified multi-national country with Chinese civilization as its main body, Chinese culture as the basis, and Han nationality as the main national. China's territory of the various ethnic groups collectively known as the Chinese nation, the dragon is the symbol of the Chinese nation. China is one of the four ancient civilizations of the world, has a long history, about 5,000 years ago, the central Plains as the center began to appear in the settlement organization and then into the country and dynasty, after many times and dynasties change, long duration of the dynasty has Xia, Shang, Zhou, Han, Jin, Tang , song, Yuan, Ming, Qing and so on. In the history of the Zhongyuan dynasty, the nomadic peoples of the North continued to engage and conquer, and many nationalities became Chinese.                               After the Xinhai Revolution in the early 20th century, China's monarchy withdrew from the historical stage and replaced it with a Republican polity. After the founding of the People's Republic of China in 1949, the Government of the NPC was established. China has a colorful folk culture, traditional art forms have poetry, drama, calligraphy and traditional Chinese painting, such as Spring Festival, Yuanxiao, Qingming, Dragon Boat Festival, mid-Autumn Festival, Chongyang, etc. are important traditional festivals in China. China is bound to rule the world again, if you don't believe it, we'll see .FontFamily= "Song Body"FontSize= " the"textwrapping= "Wrap"Margin= "0,150,0,0"   />                </Grid>            </PivotItem>            <PivotItem>                <Pivotitem.header>                    <TextBlockText= "Ame"FontFamily= "Song Body"/>                </Pivotitem.header>                <Grid>                    <StackPanelMargin= "0,0,0,400">                        <ImageSource= "Assets\ame.jpg"/>                    </StackPanel>                    <TextBlockText= "American Pinyin Meiguo."                               USA, United States of America (United States of America), is a constitutional Federal Republic of 50 states and a federal territory. It is east to the Atlantic Ocean, west to the Pacific Ocean, north by Canada, south to Mexico. The United States, with an area of more than 9.62 million square kilometres, is ranked third or fourth in the world (data is controversial) and has a population of more than 300 million people, less than China and India. July 4, 1776, the Continental Conference in Philadelphia formally adopted the Declaration of Independence, proclaimed the birth of the United States. The world's first great power "FontFamily= "Song Body"FontSize= " the"textwrapping= "Wrap"Margin= "0,150,0,0"/>                </Grid>            </PivotItem>            <PivotItem>                <Pivotitem.header>                    <TextBlockText= "Jap"FontFamily= "Song Body" />                </Pivotitem.header>                <Grid>                    <StackPanelMargin= "0,0,0,350">                        <ImageSource= "Assets\jap.png"/>                    </StackPanel>                    <TextBlockText= "Japan" is an island in the eastern part of Asia and the Pacific Northwest, which consists of four islands of Honshu, Shikoku, Kyushu, Hokkaido and more than 7,200 small islands.                               Area of 378,000 square kilometers. Many islands, peninsulas, bays and natural harbors along the coast of Japan. Japan's name means the sunrise, the territory from the state, Shikoku, Kyushu, Hokkaido four major islands and more than 7,200 small islands. The total area of 378,000 square kilometers, the population of 129 million, and the family as the main ethnic group, general Japanese language. "FontFamily= "Song Body"textwrapping= "Wrap"FontSize= " the"Margin= "0,200,0,0"/>                </Grid>            </PivotItem>            <PivotItem>                <Pivotitem.header>                    <TextBlockText= "Rus"FontFamily= "Song Body"/>                </Pivotitem.header>                <Grid>                    <StackPanelMargin= "0,180,0,0">                        <ImageSource= "Assets\russia.jpg"/>                    </StackPanel>                    <TextBlockText= "Russian Federation (English: Russian Federation), referred to as Russia (English: Russia) or Russia, is the successor state of the Russian Soviet Federal Socialist Republic, the largest constituent of the USSR, A permanent member of the UN Security Council, a country in northern Eurasia, on two continents of Europe and Asia .FontFamily= "Song Body"textwrapping= "Wrap"FontSize= " the"/>                </Grid>            </PivotItem>            <PivotItem>                <Pivotitem.header>                    <TextBlockText= "Ger"FontFamily= "Song Body"/>                </Pivotitem.header>                <Grid>                    <StackPanelMargin= "0,200,0,0">                        <ImageSource= "Assets\ger.png"/>                    </StackPanel>                    <TextBlockText= "Federal Republic of Germany" (German: Bundesrepublik Deutschland, abbreviation: Germany) is a central European federal Parliament Republic country, which consists of 16 federal states, the capital city for Berlin. The territory is 357167km², with a temperate climate and a population of about 80.71 million people, the most populous country in the European Union .FontFamily= "Song Body"FontSize= " the"textwrapping= "Wrap"/>                </Grid>            </PivotItem>        </Pivot>    </Grid></Page>

Bo Master Sina Weibo @ horse and Kang, welcome to WP interested friends mutual powder (remember private messages), common exchange windowsphone development. Bo Master just dabbled in WindowsPhone, level Limited, also hope to forgive!

Note: This blog by blog Park Bo Master @makang all, public use please specify the source!

Windows Phone App development attempt (2)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.