Windows Phone - Skalowanie z WVGA do WXGA

Windows Phone - Skalowanie z WVGA do WXGA
AF
  • Rejestracja: dni
  • Ostatnio: dni
  • Lokalizacja: Kraków
  • Postów: 13
0

Witam.
Mam pewien problem z aplikacją na WP, a mianowicie.
Design mojej aplikacji całkowicie się zmienia jeżeli odpalę ją przez emulator WXGA. Na emulatorze WVGA oraz 720p działa bardzo dobrze. Jeżeli ktoś zna możliwą przyczynę problemu to z góry dziękuję za pomoc :).

Pozdrawiam

Azarien
  • Rejestracja: dni
  • Ostatnio: dni
0

kod.. albo chociaż screen...

AF
  • Rejestracja: dni
  • Ostatnio: dni
  • Lokalizacja: Kraków
  • Postów: 13
0
Kopiuj
<Page
    x:Class="Powers.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Powers"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.Resources>
        <Thickness x:Key="PhoneBorderThickness">2.5</Thickness>
        <FontFamily x:Key="PhoneFontFamilyNormal">Segoe WP</FontFamily>
        <FontWeight x:Key="PhoneButtonFontWeight">Semibold</FontWeight>
        <x:Double x:Key="TextStyleLargeFontSize">18.14</x:Double>
        <Thickness x:Key="PhoneButtonContentPadding">9.5,0,9.5,3.5</Thickness>
        <x:Double x:Key="PhoneButtonMinHeight">57.5</x:Double>
        <x:Double x:Key="PhoneButtonMinWidth">109</x:Double>
        <Thickness x:Key="PhoneTouchTargetOverhang">0,9.5</Thickness>
        <SolidColorBrush x:Key="ButtonDisabledBackgroundThemeBrush" Color="Transparent"/>
        <Style x:Key="ButtonStyle1" TargetType="Button">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderBrush" Value="{ThemeResource PhoneForegroundBrush}"/>
            <Setter Property="Foreground" Value="{ThemeResource PhoneForegroundBrush}"/>
            <Setter Property="BorderThickness" Value="{ThemeResource PhoneBorderThickness}"/>
            <Setter Property="FontFamily" Value="{ThemeResource PhoneFontFamilyNormal}"/>
            <Setter Property="FontWeight" Value="{ThemeResource PhoneButtonFontWeight}"/>
            <Setter Property="FontSize" Value="{ThemeResource TextStyleLargeFontSize}"/>
            <Setter Property="Padding" Value="{ThemeResource PhoneButtonContentPadding}"/>
            <Setter Property="MinHeight" Value="{ThemeResource PhoneButtonMinHeight}"/>
            <Setter Property="MinWidth" Value="{ThemeResource PhoneButtonMinWidth}"/>
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid x:Name="Grid" Background="Transparent">

                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition From="Pressed" To="PointerOver">
                                            <Storyboard>
                                                <PointerUpThemeAnimation Storyboard.TargetName="Grid"/>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="PointerOver" To="Normal">
                                            <Storyboard>
                                                <PointerUpThemeAnimation Storyboard.TargetName="Grid"/>
                                            </Storyboard>
                                        </VisualTransition>
                                        <VisualTransition From="Pressed" To="Normal">
                                            <Storyboard>
                                                <PointerUpThemeAnimation Storyboard.TargetName="Grid"/>
                                            </Storyboard>
                                        </VisualTransition>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="PointerOver"/>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <PointerDownThemeAnimation Storyboard.TargetName="Grid"/>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonPressedForegroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonPressedBackgroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonDisabledForegroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonDisabledBorderThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonDisabledBackgroundThemeBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Margin="{ThemeResource PhoneTouchTargetOverhang}">
                                <ContentPresenter x:Name="ContentPresenter" AutomationProperties.AccessibilityView="Raw" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="42.5,22.5,41.333,15.167" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>

                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <x:Double x:Key="TextControlThemeMinWidth">51</x:Double>
        <x:Double x:Key="TextControlThemeMinHeight">34</x:Double>
        <Thickness x:Key="TextControlBorderThemeThickness">2.5</Thickness>
        <x:Double x:Key="ContentControlFontSize">20.26</x:Double>
        <Thickness x:Key="TextControlThemePadding">7,0.8,8,0</Thickness>
        <Thickness x:Key="TextControlMarginThemeThickness">0,9.5,0,9.5</Thickness>
        <Thickness x:Key="TextControlHeaderMarginThemeThickness">0,0,0,4.8</Thickness>
        <SolidColorBrush x:Key="TextBoxDisabledBackgroundThemeBrush" Color="Transparent"/>
        <x:Double x:Key="TextControlBorderThemeOpacity">0.8</x:Double>
        <Style x:Key="ContentControlStyle1" TargetType="ContentControl">
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ContentControl">
                        <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="TextBoxStyle1" TargetType="TextBox">
            <Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}"/>
            <Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}"/>
            <Setter Property="Foreground" Value="{ThemeResource TextBoxForegroundThemeBrush}"/>
            <Setter Property="SelectionHighlightColor" Value="{ThemeResource TextSelectionHighlightColorThemeBrush}"/>
            <Setter Property="Background" Value="{ThemeResource TextBoxBackgroundThemeBrush}"/>
            <Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}"/>
            <Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}"/>
            <Setter Property="FontFamily" Value="{ThemeResource PhoneFontFamilyNormal}"/>
            <Setter Property="FontSize" Value="{ThemeResource ContentControlFontSize}"/>
            <Setter Property="TextWrapping" Value="NoWrap"/>
            <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Auto"/>
            <Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto"/>
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
            <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False"/>
            <Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}"/>
            <Setter Property="Margin" Value="{ThemeResource TextControlMarginThemeThickness}"/>
            <Setter Property="VerticalAlignment" Value="Top"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="TextBox"/>
                </Setter.Value>
            </Setter>
        </Style>
    </Page.Resources>
    <Page.Background>
        <SolidColorBrush Color="{ThemeResource PhoneBackgroundColor}"/>
    </Page.Background>

    <Grid Background="#FF2C3E50">
        <Button Content="COUNT" HorizontalAlignment="Center" Margin="107,397,92,137" VerticalAlignment="Center" FontWeight="Bold" FontFamily="Arial Black" Height="106" Width="201" BorderBrush="#00000000" Foreground="White" Background="#FFE74C3C"  FontSize="27" RenderTransformOrigin="0.893,0.799" IsRightTapEnabled="False" IsHoldingEnabled="False" IsDoubleTapEnabled="False" Style="{StaticResource ButtonStyle1}" Tapped="click_show"/>
        <TextBox x:Name="Text_N" HorizontalAlignment="Left" Margin="245,74,0,0" TextWrapping="Wrap" TextAlignment="Center" VerticalAlignment="Top" MaxLength="2" Height="61" Width="60" Background="#99D8C6C6" PlaceholderText="" SelectionHighlightColor="Transparent" BorderBrush="White" IsRightTapEnabled="False" IsHoldingEnabled="False" IsDoubleTapEnabled="False" FontFamily="Arial Black" InputScope="Number" FontSize="36" Tapped="n_tapped" TextChanged="n_text_test" VerticalContentAlignment="Bottom" Foreground="Black"/>
        <TextBlock HorizontalAlignment="Left" Margin="107,579,0,42" TextWrapping="Wrap" Text="       Designed by Artur Teodorowicz" VerticalAlignment="Center" Height="19" Width="196" IsDoubleTapEnabled="False" IsHoldingEnabled="False" IsRightTapEnabled="False" IsTapEnabled="False" FontFamily="Arial Black" Foreground="#99E6D6D6"/>
        <TextBox x:Name="Text_Result" HorizontalAlignment="Center" TextAlignment="Center" Margin="40,312,42,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="50" Width="318" Background="Transparent" IsReadOnly="True" BorderBrush="Transparent" SelectionHighlightColor="#000B6CF8" Foreground="White" FontFamily="Manteka" FontWeight="Bold" IsTextPredictionEnabled="False" IsTapEnabled="False" IsRightTapEnabled="False" IsHoldingEnabled="False" IsDoubleTapEnabled="False" FlowDirection="RightToLeft" ManipulationMode="None" FontSize="25" IsEnabled="False" IsHitTestVisible="False" IsTabStop="False"/>
        <TextBox x:Name="Text_X" HorizontalAlignment="Left" Margin="107,92,0,0" TextAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Top" Height="109" Width="133" Background="#99FFFFFF" PlaceholderText="" MaxLength="3" SelectionHighlightColor="Transparent" BorderBrush="White" IsRightTapEnabled="False" IsHoldingEnabled="False" IsDoubleTapEnabled="False" FontFamily="Arial Black" InputScope="Number" FontSize="65" VerticalContentAlignment="Bottom" Tapped="x_tapped" TextChanged="x_text_test" Foreground="Black"/>
        <TextBlock x:Name="Toast" HorizontalAlignment="Center" Margin="5,370,5,0" TextWrapping="Wrap" TextAlignment="Center" VerticalAlignment="Top" Height="20" Width="390" FontSize="14"/>
        <TextBlock x:Name="Toast_X" HorizontalAlignment="Center" Margin="138,79,166,0" TextWrapping="Wrap" Text="X" VerticalAlignment="Top" Height="157" Width="96" FontFamily="Arial Black" FontSize="120" Foreground="#99FFFFFF" IsTapEnabled="False" IsRightTapEnabled="False" IsHoldingEnabled="False" IsDoubleTapEnabled="False" ManipulationMode="None" IsHitTestVisible="False"/>
        <TextBlock x:Name="Toast_N" HorizontalAlignment="Left" Margin="263,79,0,0" TextWrapping="Wrap" Text="n" VerticalAlignment="Top" Height="90" Width="113" FontFamily="Arial Black" FontSize="40" FontWeight="Bold" Foreground="#99FFFFFF" IsTapEnabled="False" IsRightTapEnabled="False" IsHoldingEnabled="False" IsDoubleTapEnabled="False" ManipulationMode="None" IsHitTestVisible="False"/>
        <Button Content="CLEAR " HorizontalAlignment="Left" Margin="138,506,0,0" VerticalAlignment="Top" Width="136" Background="#FFE74C3C" BorderBrush="Transparent" FontFamily="Arial Black" Tapped="click_clear" FontSize="24"/>
        <TextBlock HorizontalAlignment="Left" Margin="194,598,0,23" TextWrapping="Wrap" Text="2015" VerticalAlignment="Center" Height="19" Width="196" IsDoubleTapEnabled="False" IsHoldingEnabled="False" IsRightTapEnabled="False" IsTapEnabled="False" FontFamily="Arial Black" Foreground="#99E6D6D6"/>

    </Grid>
</Page>

Zarejestruj się i dołącz do największej społeczności programistów w Polsce.

Otrzymaj wsparcie, dziel się wiedzą i rozwijaj swoje umiejętności z najlepszymi.