MegaBites-AI/Windows-powershell
0372
1<!--=================================================================2// Copyright (c) Microsoft Corporation.3// Licensed under the MIT License.4==================================================================-->5 6<UserControl x:Class="Microsoft.PowerShell.Commands.ShowCommandInternal.CmdletControl"7 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"8 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"9 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"10 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"11 xmlns:ch="clr-namespace:Microsoft.PowerShell.Commands.ShowCommandInternal"12 xmlns:default="clr-namespace:"13 xmlns:controls="clr-namespace:Microsoft.PowerShell.Commands.ShowCommandInternal"14 mc:Ignorable="d"15 FocusManager.FocusedElement="{Binding ElementName=HelpButton}"16 d:DesignHeight="300" d:DesignWidth="300">17 <Grid>18 <Grid.RowDefinitions>19 <RowDefinition Height="Auto"></RowDefinition>20 <RowDefinition Height="*"></RowDefinition>21 <RowDefinition Height="{Binding CommonParametersHeight}"></RowDefinition>22 </Grid.RowDefinitions>23 <Grid Grid.Row="0">24 <Grid.ColumnDefinitions>25 <ColumnDefinition Width="*"></ColumnDefinition>26 <ColumnDefinition Width="Auto"></ColumnDefinition>27 </Grid.ColumnDefinitions>28 <Label Grid.Column="0" HorizontalAlignment="Left" Content="{Binding DetailsTitle}"></Label>29 <controls:ImageButton x:Name="helpButton" EnabledImageSource="/Microsoft.PowerShell.GraphicalHost;component/resources/Graphics/Help.ico" Grid.Column="1" AutomationProperties.AutomationId="btnGetHelp" ToolTip="{x:Static default:ShowCommandResources.CmdletControl_Button_ToolTip_Help}" AutomationProperties.Name="{x:Static default:ShowCommandResources.CmdletControl_Button_ToolTip_Help}"></controls:ImageButton>30 </Grid>31 <Border BorderBrush="{x:Static SystemColors.ControlDarkBrush}" BorderThickness="1" Grid.Row="1" Margin="3" Padding="0,3,3,0" Visibility="{Binding NoParameterVisibility}">32 <TextBlock Margin="3" x:Name="NoParametersText" Text="{x:Static default:ShowCommandResources.NoParameters}"></TextBlock>33 </Border>34 <Border BorderBrush="{x:Static SystemColors.ControlDarkBrush}" BorderThickness="1" Grid.Row="1" Margin="3" Padding="0,3,3,0" Visibility="{Binding SingleParameterSetControlVisibility}">35 <ch:ParameterSetControl x:Name="ParameterSetControl" DataContext="{Binding Path=ParameterSets[0]}" AutomationProperties.Name="{Binding Path=Name}"/>36 </Border>37 <ch:NotImportedCmdletControl x:Name="NotImportedControl" Grid.Row="1" Margin="3" Visibility="{Binding NotImportedVisibility}" AutomationProperties.AutomationId="notImportedCmdletControl"/>38 <TabControl Grid.Row="1" Margin="3" x:Name="ParameterSetTabControl" ItemsSource="{Binding ParameterSets}" SelectedItem="{Binding Path=SelectedParameterSet, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding ParameterSetTabControlVisibility}" AutomationProperties.AutomationId="tabControlParameterSet" AutomationProperties.Name="{x:Static default:ShowCommandResources.DetailsParameterTitleFormat}" Tag="{x:Static default:ShowCommandResources.DetailsParameterTitleFormat}">39 <TabControl.ItemContainerStyle>40 <Style TargetType="TabItem">41 <Setter Property="AutomationProperties.Name" Value="{Binding Name}"/>42 </Style>43 </TabControl.ItemContainerStyle>44 <TabControl.ItemTemplate>45 <DataTemplate>46 <TextBlock Text="{Binding Name}" AutomationProperties.Name="{Binding Name}"></TextBlock>47 </DataTemplate>48 </TabControl.ItemTemplate>49 <TabControl.ContentTemplate>50 <DataTemplate>51 <ch:ParameterSetControl x:Name="ParameterSetControl" DataContext="{Binding}" AutomationProperties.Name="{Binding Name}" Tag="{Binding Name}"/>52 </DataTemplate>53 </TabControl.ContentTemplate>54 </TabControl>55 <Border x:Name="UbiquitousBorder" Grid.Row="2" BorderBrush="{x:Static SystemColors.ControlDarkBrush}" BorderThickness="1" Margin="3" Visibility="{Binding CommonParameterVisibility}" AutomationProperties.Name="{x:Static default:ShowCommandResources.CmdletControl_Header_CommonParameters}" Tag="{x:Static default:ShowCommandResources.CmdletControl_Header_CommonParameters}">56 <Expander IsExpanded="{Binding AreCommonParametersExpanded}" Header="{x:Static default:ShowCommandResources.CmdletControl_Header_CommonParameters}" AutomationProperties.AutomationId="grpCommonGroup" Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}">57 <ch:ParameterSetControl DataContext="{Binding CommonParameters}" AutomationProperties.Name="{x:Static default:ShowCommandResources.CmdletControl_Header_CommonParameters}" Tag="{x:Static default:ShowCommandResources.CmdletControl_Header_CommonParameters}"/>58 </Expander>59 </Border>60 </Grid>61</UserControl>62 