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.
<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>
, , , , ( - ), . , Visual Studio , , .
, /, . Window SizeToContent = WidthAndHeight. , MinWidth/MinHeight, .
? , .
, WPF . DPI? . , .
MSDN:
. WPF - , 1/96 , , . (dpi) , .
http://msdn.microsoft.com/en-us/library/aa970268.aspx
Source: https://habr.com/ru/post/1770296/More articles:Android: Как отправить данные с сервера на Android и без запроса от андроида? - androidCan I drain selectors with jQuery? - jqueryZend.htaccess configuration does not work in Ubuntu - apache2Exiting the eval argument - javascriptjQuery and shortcuts - jqueryRight justify button in the grid, possibly without content - a stretch grid to always fill the page - layoutКак передать пустой аргумент Popen (с shell = False)? - pythonSimple bash expression analysis in bash - linuxКак избежать "привязки к большим объектам CLR"? - c#iPhone: memory leak on auto-implemented object? - memory-managementAll Articles