Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6532905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:03:38+00:00 2026-05-25T10:03:38+00:00

I have the following Window created in WPF. This is how it’s shown: I

  • 0

I have the following Window created in WPF. This is how it’s shown:

enter image description here

I have no idea why the screen is shown so big and I don’t know how to debug why is it getting so wide.

This is the code related to the problem:

<Window x:Class="Picis.CpCustomize.CustomizeControls.Dialogs.EditIntegerWindow"
MinWidth="350"
SizeToContent="Height"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
ResizeMode="CanResize" 
ShowInTaskbar="False" 
WindowStartupLocation="CenterScreen" 
WindowState="Normal"
Loaded="OnWindowLoaded">

<!-- Main frame -->
<Grid>

    <!-- Layout -->
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>

    <TextBlock VerticalAlignment="Center" MinWidth="100" TextAlignment="Right">
        <TextBlock.Text>
            <Binding Converter="{StaticResource Localizer}" ConverterParameter="General.Value" />
        </TextBlock.Text>
    </TextBlock>

    <TextBox x:Name="valueTextBox" Grid.Column="1" Margin="5" Text="{Binding Path=Value}"/>

    <TextBlock  VerticalAlignment="Center"  Grid.Row="1" Grid.Column="0"  HorizontalAlignment="Right" Visibility="{Binding Path=ShowComments, Converter={StaticResource VisiConv}, ConverterParameter=Collapse}" MinWidth="100" TextAlignment="Right">
            <TextBlock.Text>
                <Binding Converter="{StaticResource Localizer}" ConverterParameter="EditParamDlg.Comment" />
            </TextBlock.Text>
    </TextBlock>

    <TextBox x:Name="commentTextBox" Grid.Row="1" Grid.Column="1" Margin="5" Visibility="{Binding Path=ShowComments, Converter={StaticResource VisiConv}, ConverterParameter=Collapse}" Text="{Binding Path=Comment}"/>

    <CheckBox Grid.Row="2" Grid.Column="1" Margin="5" x:Name="isDeletedCheckBox" Visibility="{Binding Path=ShowIsDeleted, Converter={StaticResource VisiConv}, ConverterParameter=Collapse}"
            IsChecked="{Binding Path=IsDeleted}">
        <CheckBox.Content>
            <Binding Converter="{StaticResource Localizer}" ConverterParameter="EditParamDlg.IsDeleted" />
        </CheckBox.Content>
    </CheckBox>

    <UniformGrid Grid.Row="3" Grid.Column="1" Margin="5" HorizontalAlignment="Right" Columns="2">
        <Button  x:Name="okButton" Click="OnOk"  IsDefault="True">
            <Button.Content>
                <Binding Converter="{StaticResource Localizer}" ConverterParameter="General.Ok" />
            </Button.Content>
        </Button>
        <Button x:Name="cancelButton"  Click="OnCancel" Margin="5,0,0,0"  IsCancel="True">
            <Button.Content>
                <Binding Converter="{StaticResource Localizer}" ConverterParameter="General.Cancel" />
            </Button.Content>
        </Button>
    </UniformGrid>

</Grid>
</Window>

My first question is how to debug this issue, the second one is what is happening in this specific scenario.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:03:39+00:00Added an answer on May 25, 2026 at 10:03 am

    This question is a duplicate of: Why are my WPF window sizes defaulting to be huge

    And according to: Window Size when SizeToContent is not specified the default size when not specified is 60% of the width and 60% of the height of your primary screen.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following the guide here, I have created a full-screen WPF application. But I met
I have the following hierarchy of classes: abstract MyWindowBase : System.Windows.Window (i.e. the WPF
I have the following grid in my WPF Window (yes the class Window); <Grid
I have the following code to create my window, my view and my sub
I have the following extJs window which has two tabs in it. One of
I have the following application: I have 1 window. On that window I add
I have the following javascript. window.location.href = _searchUrl + query.replace(/\s+/g, '+') .replace('/', '-') .replace('\\','-')
I have the following C# code to launch an outlook window. The one think
I have the following code to take screenshots of a window: HDC WinDC; HDC
I have the following code to take a screenshot of a window, and get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.