Select to view content in your preferred language

How can I make the maximize-button invisible in a ProWindow?

142
3
Monday
DirkTillmanns
New Contributor III

I set the intended property ShowMaxRestoreButton to false (regardless of whether in XAML or constructor). As you can see in the screenshot, ProWindow seems to manipulate this property during the initialization of the dialog. My WindowsStyle is ToolWindow. Maximize shouldn't be displayed even without being explicitly set. Everything works correctly in System.Windows.Window. ProWindow inherits from this.

Does somebody has any idea?

DirkTillmanns_1-1719222245324.png

 

DirkTillmanns_0-1719221897026.png

 

 

 

 

0 Kudos
3 Replies
DirkTillmanns
New Contributor III

Forgot, I work with ArcGIS Pro 3.3.0

0 Kudos
GKmieliauskas
Esri Regular Contributor

Hi,

Adding ResizeMode="NoResize" to ProWindow xaml will hide maximize and minimize buttons and disable windows resizing.

<controls:ProWindow x:Class="************"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:controls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
        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:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
        mc:Ignorable="d"
        Title="Window Title" 
        ResizeMode="NoResize"
    >
0 Kudos
DirkTillmanns
New Contributor III

Hi,

That's not a solution. I want to allow a resize. But a maximize doesn't make sense in my dialog.

I think there are bugs in the Pro SDK here. Pro manipulates "System.Windows.Window", which it derives from, certainly unintentionally. For example, a "ToolWindow" has no maximize button by default in "Window". But in "ProWindow" it does.

https://learn.microsoft.com/en-us/dotnet/api/system.windows.window.windowstyle?view=windowsdesktop-8... 

 

 

 

0 Kudos