LoginSignup
3
2

More than 5 years have passed since last update.

Visual Studio / WPF > Form > Windowの最大化、最小化をできなくする > ResizeMode="NoResize" | ToolWindow

Last updated at Posted at 2017-06-14
動作環境
Windows 7 Pro (32bit)
Microsoft Visual Studio 2017 Community

「最大化、最小化」付き

2017-06-14_17h29_13.png

方法1 > ResizeMode="NoResize"

参考: https://stackoverflow.com/questions/339620/how-do-i-remove-minimize-and-maximize-from-a-resizable-window-in-wpf

ResizeMode="NoResize"
をWindowに入れる。

MainWindow.xaml
<Window x:Class="_170614_t1700_listBoxDesign.MainWindow"
        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"
        xmlns:local="clr-namespace:_170614_t1700_listBoxDesign"
        mc:Ignorable="d"
        ResizeMode="NoResize"
        Title="MainWindow" Height="350" Width="525"/>

2017-06-14_17h31_23.png

方法2 > ToolWindow

Windows GUIプログラミング入門5 画面レイアウト(2)、画面遷移(1)

WindowのWindowStyleプロパティは最小化ボタン・最大化ボタンが無いToolWindowに設定します。

2017-06-14_17h33_01.png

  • 角丸でない
  • xボタンが小さい
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2