Percentage dimensions wpf c #

0

I'm designing an interface with WPF, I have the great inconvenience that when I ask to start maximized, I lose the size with which I have designed and therefore the controls I use are disordered, there is some way that the width and height of the grid or any container that can be used fits 100% of any screen?

<Window x:Class="Project.Dashboard"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Loaded="Window_Loaded_1"
    xmlns:rg="clr-namespace:SourceChord.ResponsiveGrid;assembly=ResponsiveGrid.Wpf"
    mc:Ignorable="d"
    Foreground="White"
    WindowState="Maximized"
    Width="1200"
    Height="810"
    WindowStartupLocation="CenterScreen"
    WindowStyle="None">

<Grid VerticalAlignment="Center" Height="810" Margin="0,-10,2,2">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="1*"/>
        <ColumnDefinition Width="1*"/>
    </Grid.ColumnDefinitions>
    <Button Grid.Column="0" Margin="-5,10,0,768">Button1</Button>
    <Button Grid.Column="1" Margin="0,10,0,768">Button2</Button>
</Grid>

I have a couple of buttons that I place at the top of the grid but when I deploy the application they are out of the screen, what I need is a grid or other control that can be adapted to the sizes.

    
asked by DVertel 07.11.2018 в 18:15
source

0 answers