Disable resize

Posted on 2011-10-23
Last Modified: 2012-05-12
Hello all,

I program with WPF. How can I disable resize?  



Thank you very much in advance. :)
Question by:chang2008
    LVL 8

    Expert Comment

    Set same value of UserControl's MinHeight and MaxHeight properties to control height and set same value of MinWidth and MaxWidth properties to control the width.

    <UserControl ..... MinHeight="100" MaxHeight="100" MinWidth="200" MaxWidth="200">
    LVL 16

    Accepted Solution

    there is resize property set it to NoResize.

    check below sample

    <Window x:Class="WpfApplication1.MainWindow"
            Title="MainWindow" Height="350" Width="525" ResizeMode="NoResize">

    Author Comment

    I did like this & it works.

    Window window = new Window();
    window.ResizeMode = ResizeMode.NoResize;


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Suggested Solutions

    Title # Comments Views Activity
    Submitting to a REST API via a CLR in C# 12 49
    VB.Net - How to update a database 4 32
    c# string 6 26
    Jquery oncheck to update SPAN 31 30
    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    This video discusses moving either the default database or any database to a new volume.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now