Visual Studio 2010 WPF Designer scale

I made a simple interface in Visual Studio 2010. When starting the application more and more. The red square in the screenshot represents the size of the button in the running application (on the right). Am I missing something? How to fix it?

PS In "Microsoft Expression Blend 4" the same project has the same size as in the editor.


WindowsScale slider


<Window x:Class="WpfControlReview.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="120" Width="256" ResizeMode="NoResize">
    <Grid>
        <Button HorizontalAlignment="Stretch" Name="button1" VerticalAlignment="Stretch">
        <StackPanel HorizontalAlignment="Stretch" Name="stackPanel1" VerticalAlignment="Center">
            <Label IsHitTestVisible="False" Content="Select your options and press to commit" Name="label1" HorizontalContentAlignment="Center" FontSize="12" />
            <StackPanel Name="stackPanel2" Orientation="Horizontal">
                <Expander Header="Color" Name="expander1">
                </Expander>
                <Expander Header="Make" Name="expander2">
                </Expander>
                <Expander Header="Payment" Name="expander3">
                </Expander>
            </StackPanel>
        </StackPanel>
        </Button>
    </Grid>
</Window>
+3
source share
3 answers

, , , , ( - ), . ​​, Visual Studio , , .

, /, . Window SizeToContent = WidthAndHeight. , MinWidth/MinHeight, .

+1

? , .

+1

, WPF . DPI? . , .

MSDN:

. WPF - , 1/96 , , . (dpi) , .

http://msdn.microsoft.com/en-us/library/aa970268.aspx

+1
source

Source: https://habr.com/ru/post/1770296/


All Articles