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.AllModulesControl"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:this="clr-namespace:Microsoft.PowerShell.Commands.ShowCommandInternal"12 xmlns:default="clr-namespace:"13 xmlns:sc="clr-namespace:Microsoft.Management.UI.Internal"14 FocusManager.FocusedElement="{Binding ElementName=CommandName}"15 mc:Ignorable="d"16 d:DesignHeight="300" d:DesignWidth="300">17 <Grid>18 <Border Background="Transparent" Cursor="Wait" Visibility="{Binding WaitMessageVisibility}">19 <TextBlock x:Name="WaitMessageText" Focusable="True" TextWrapping="Wrap" Text="{x:Static default:ShowCommandResources.PleaseWaitMessage}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>20 </Border>21 <Grid Visibility="{Binding MainGridVisibility}">22 <Grid.RowDefinitions>23 <RowDefinition Height="Auto"></RowDefinition>24 <RowDefinition Height="*"></RowDefinition>25 </Grid.RowDefinitions>26 <Grid Grid.Row="0" Margin="3">27 <Grid.ColumnDefinitions>28 <ColumnDefinition Width="Auto"></ColumnDefinition>29 <ColumnDefinition Width="*"></ColumnDefinition>30 <ColumnDefinition Width="Auto"></ColumnDefinition>31 </Grid.ColumnDefinitions>32 <Grid.RowDefinitions>33 <RowDefinition Height="Auto"></RowDefinition>34 <RowDefinition Height="Auto"></RowDefinition>35 </Grid.RowDefinitions>36 <Label Content="{x:Static default:ShowCommandResources.AllModulesControl_Label_Modules}" Grid.Row="0" Grid.Column="0" Margin="3"></Label>37 <ComboBox x:Name="ModulesCombo" Grid.Row="0" Grid.Column="1" Margin="3" ItemsSource="{Binding Modules}" AutomationProperties.Name="{x:Static default:ShowCommandResources.ModulesAutomationName}" DisplayMemberPath="DisplayName" SelectedItem="{Binding SelectedModule}" AutomationProperties.AutomationId="comboxModules">38 <ComboBox.ItemContainerStyle>39 <Style TargetType="ComboBoxItem">40 <Setter Property="AutomationProperties.Name" Value="{Binding DisplayName}"/>41 </Style>42 </ComboBox.ItemContainerStyle>43 </ComboBox>44 <Button x:Name="RefreshButton" Padding="2,0,2,0" Grid.Row="0" Grid.Column="2" Click="RefreshButton_Click" Visibility="{Binding RefreshVisibility}" Margin="3" Content="{x:Static default:ShowCommandResources.ShowModuleControl_RefreshButton}"45 IsEnabled="{Binding Path='ExtraViewModel.CanRefresh'}"46 ToolTip="{x:Static this:AllModulesViewModel.RefreshTooltip}"></Button>47 <Label Grid.Row="1" Grid.Column="0" Margin="3" Content="{x:Static default:ShowCommandResources.ShowModuleControl_Label_Name}"></Label>48 <TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" x:Name="CommandName" Text="{Binding Path=CommandNameFilter, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="txtCommandName" AutomationProperties.Name="{x:Static default:ShowCommandResources.CommandNameAutomationName}"></TextBox>49 </Grid>50 <this:ShowModuleControl x:Name="ShowModuleControl" Grid.Row="1" DataContext="{Binding SelectedModule}" Margin="3"/>51 </Grid>52 </Grid>53</UserControl>54 