Disable the ProWindow Minimize and Maximize buttons

137
2
Jump to solution
04-18-2019 11:37 AM
BrianBulla
Regular Contributor

Hi,

I cannot figure out how to disable the Minimize and Maximize buttons on a ProWindow.  I see the choices for Appearance - Window Style, but even setting it at ToolWindow the Min/Max buttons are still there:

<controls:ProWindow x:Class="RowChanged_TEST.ProWindow"
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="Tracked Layers" Height="470.347" Width="300"
WindowStartupLocation="CenterOwner" ResizeMode="CanResizeWithGrip" WindowStyle="ToolWindow"
>

<controls:ProWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</controls:ProWindow.Resources>

<Grid>
<ListBox x:Name="lstLayers" Margin="10,37,10,10" BorderBrush="{DynamicResource Esri_TextControlBrush}" FontSize="14"/>
<Label x:Name="label" Content="Map Frame - Layer Name" Foreground="{DynamicResource Esri_TextControlBrush}" HorizontalAlignment="Left" Height="35" Margin="10,2,0,0" VerticalAlignment="Top" Width="195" FontSize="15"/>

</Grid>
</controls:ProWindow>
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Any ideas on what might be going on??

0 Kudos
1 Solution

Accepted Solutions
UmaHarano
Esri Regular Contributor

You can set this in the XAML for the ProWindow -

 ShowMinButton="False"   
ShowCloseButton="False" ShowMaxRestoreButton="False"
WindowStartupLocation="CenterOwner"

<controls:ProWindow x:Class="ProWindow.ProWindow1"
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="ProWindow1" Height="300" Width="300"
ShowMinButton="False"
ShowCloseButton="False" ShowMaxRestoreButton="False"
WindowStartupLocation="CenterOwner"
>

View solution in original post

0 Kudos
2 Replies
UmaHarano
Esri Regular Contributor

You can set this in the XAML for the ProWindow -

 ShowMinButton="False"   
ShowCloseButton="False" ShowMaxRestoreButton="False"
WindowStartupLocation="CenterOwner"

<controls:ProWindow x:Class="ProWindow.ProWindow1"
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="ProWindow1" Height="300" Width="300"
ShowMinButton="False"
ShowCloseButton="False" ShowMaxRestoreButton="False"
WindowStartupLocation="CenterOwner"
>

View solution in original post

0 Kudos
BrianBulla
Regular Contributor

Thanks Uma!!

0 Kudos