English 中文(简体)
在景观网页上添加孔隙儿童元素
原标题:Adding portrait child element to landscape page

I m developing a WP7 app in silverlight. I almost done but, I need to insert new user-control in portrait view as a child element of landscape root page. Each child element (excluding this) is in landscape mode and it can t be changed.

When I change SupportedOrientation to PortrailorLandscape in RootPage and toggle orientation in emulator to portrait then every child element, that was in landscape, is cutted.

这是我做的:

页: 1

<phone:PhoneApplicationPage 
    x:Class="app.Root"
    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"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Landscape" Orientation="LandscapeLeft"
    mc:Ignorable="d" d:DesignHeight="480" d:DesignWidth="800" shell:SystemTray.IsVisible="False">
    <Grid  Width="800" Height="480" Loaded="RootGrid_Loaded">
        <Popup x:Name="myPopup">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="480"/>
                </Grid.RowDefinitions>
                <Border x:Name="popupBorder"/>
            </Grid>
        </Popup>
        <Canvas x:Name="ScreenRoot"
                      Visibility="Visible"
                      Width="800" Height="480">
<Canvas.Children/>
        </Canvas>
    </Grid>
</phone:PhoneApplicationPage>

接着,用户控制作为筛查室的儿童:

<UserControl 
    x:Class="app.Settings"
    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"
    FontFamily="{StaticResource OCRAExt}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="WhiteSmoke" 
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False">
<Grid x:Name="SettingsRoot" Background="Black" Width="480" Height="800">
...
...
</Grid>
</UserControl>

用户控制以国家机器收听他的国家,然后作为儿童加入根基。

请帮助我:

问题回答

我不敢理解你真的想要做些什么,但你可以尝试向用户Control申请翻译,以便使其保持 por。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签