none
window size RRS feed

  • Frage

  • hi ich habe ein problem mit xaml

    ich will das  alle steuerelement der größe des nutzenden handys angepasst werden.

    d.h im verhältnis zur auflösung stehen

    aber wie es aussieht geht oder funktioniert es nicht

    danke im vorraus und mein code:

       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="using:test"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:UI="using:Microsoft.Advertising.Mobile.UI"
        x:Class="Btest.MainPage" Height="Auto" Width="Auto"
        mc:Ignorable="d"
        Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

        <Grid Height="Auto" Width="Auto">
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black" Offset="0"/>
                    <GradientStop Color="Black" Offset="1"/>
                </LinearGradientBrush>
            </Grid.Background>

            <Button x:Name="btn_play" Content="Play" HorizontalAlignment="Left" Margin="126,239,0,0" VerticalAlignment="Top" Width="148" Click="Button_Click" Background="Black"/>
            <TextBlock x:Name="txtB_test" HorizontalAlignment="Left" Margin="126,24,0,0" TextWrapping="Wrap" Text="test" VerticalAlignment="Top" FontSize="72"/>
            <Button x:Name="btn_stats" Content="Stats" HorizontalAlignment="Left" Margin="126,351,0,0" VerticalAlignment="Top" Width="148"/>
            <Button x:Name="btn_more" Content="More" HorizontalAlignment="Left" Margin="126,449,0,0" VerticalAlignment="Top" Width="148"/>

            <UI:AdControl x:Name="adcontrol" AutoRefreshIntervalInSeconds="60" ApplicationId="test_client" AdUnitId="Image320_50" HorizontalAlignment="Left" Height="69" IsAutoRefreshEnabled="True" Margin="10,571,0,0" VerticalAlignment="Top" Width="380"/>
            <TextBlock x:Name="txtB_hightscore" Margin="30,140,30,0" TextWrapping="Wrap" Text="Hightscore : " VerticalAlignment="Top" Height="26" SelectionChanged="TextBlock_SelectionChanged" FontSize="20"/>
            <TextBlock x:Name="txtB_score" HorizontalAlignment="Left" Margin="30,187,0,0" TextWrapping="Wrap" Text="Score :" VerticalAlignment="Top" Height="26
                       " Width="340" FontSize="20"/>

            <Canvas x:Name="picture" Margin="0,425,0,0" Visibility="Collapsed" Grid.Row="2">
                <Canvas.Background>
                    <ImageBrush ImageSource="Assets/Bottom.png" Stretch="None" />
                </Canvas.Background>
            </Canvas>
            <Grid HorizontalAlignment="Left" Height="630" Margin="10,10,0,0" VerticalAlignment="Top" Width="390"/>

        </Grid>
    </Page>



    • Bearbeitet Johannes_W Dienstag, 14. April 2015 18:55
    Dienstag, 14. April 2015 18:53

Antworten