Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLVS-1651 Manage Binding window minor UI fixes #5928

Merged
merged 3 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/ConnectedMode/UI/ConnectionInfoComponent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

<Grid DataContext="{Binding ElementName=ConnectionInfoUc, Path=ConnectionInfo}">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<Image Grid.Column="0" Height="25" Margin="{Binding ElementName=ConnectionInfoUc, Path= ImageMargin}"
Expand All @@ -41,6 +41,8 @@
</Image>
<TextBlock x:Name="IdTextBlock" Grid.Column="1" Text="{Binding Path=Id}"
Margin="5,0,0,0"
TextWrapping="Wrap"
TextTrimming="CharacterEllipsis"
VerticalAlignment="{Binding ElementName=ConnectionInfoUc, Path=TextAndIconVerticalAlignment}"
FontWeight="{Binding ElementName=ConnectionInfoUc, Path=TextFontWeight}" />
</Grid>
Expand Down
107 changes: 61 additions & 46 deletions src/ConnectedMode/UI/ManageBinding/ManageBindingDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,58 +100,73 @@
</Grid>
</GroupBox>

<Grid Grid.Row="1" Margin="0, 15">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="1" Margin="0, 15" Grid.IsSharedSizeScope="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" SharedSizeGroup="ButtonColumn"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{x:Static res:UiResources.ConnectionToBindLabel}" Margin="0,15,0,5"/>
<ComboBox x:Name="ConnectionsComboBox" Grid.Row="1" Grid.Column="0" ItemsSource="{Binding Path=Connections}"
SelectedItem="{Binding Path=SelectedConnectionInfo}" IsEnabled="{Binding Path=IsConnectionSelectionEnabled}">
<ComboBox.ItemTemplate>
<DataTemplate>
<ui:ConnectionInfoComponent ConnectionInfo="{Binding Path=.}" TextFontWeight="Normal" ImageMargin="0" TextAndIconVerticalAlignment="Center"
MaxWidth="{Binding ElementName=ConnectionsComboBox, Path=ActualWidth, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Padding="5,0" Text="{Binding Path=ConnectionSelectionCaptionText}"
Style="{StaticResource CaptionTextBlock}"
Visibility="{Binding Path=IsConnectionSelected, Converter={StaticResource TrueToCollapsedConverter}}"/>
<Button Grid.Row="1" Grid.Column="1" Content="{x:Static res:UiResources.ManageConnectionsButton}" HorizontalAlignment="Right"
IsEnabled="{Binding Path=IsManageConnectionsButtonEnabled}" Click="ManageConnections_OnClick"/>
</Grid>

<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{x:Static res:UiResources.ConnectionToBindLabel}" Margin="0,15,0,5"/>
<ComboBox Grid.Row="1" Grid.Column="0" ItemsSource="{Binding Path=Connections}"
SelectedItem="{Binding Path=SelectedConnectionInfo}" IsEnabled="{Binding Path=IsConnectionSelectionEnabled}">
<ComboBox.ItemTemplate>
<DataTemplate>
<ui:ConnectionInfoComponent ConnectionInfo="{Binding Path=.}" TextFontWeight="Normal" ImageMargin="0" TextAndIconVerticalAlignment="Center"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Padding="5,0" Text="{Binding Path=ConnectionSelectionCaptionText}"
Style="{StaticResource CaptionTextBlock}"
Visibility="{Binding Path=IsConnectionSelected, Converter={StaticResource TrueToCollapsedConverter}}"/>
<Button Grid.Row="1" Grid.Column="1" Content="{x:Static res:UiResources.ManageConnectionsButton}" HorizontalAlignment="Right"
IsEnabled="{Binding Path=IsManageConnectionsButtonEnabled}" Click="ManageConnections_OnClick"/>


<TextBlock Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Text="{x:Static res:UiResources.ProjectToBindLabel}" Margin="0,15,0,5"/>
<Border Grid.Row="3" Grid.Column="0" BorderBrush="{DynamicResource {x:Static vsShell:VsBrushes.ActiveBorderKey}}" BorderThickness="1" Height="30"
Background="{Binding ElementName=ConnectionsCombobox, Path=Background}">
<TextBlock VerticalAlignment="Center" Padding="5,0">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsProjectSelected}" Value="False">
<Setter Property="Text" Value="{x:Static res:UiResources.SelectProjectToBindDescription}"/>
<Setter Property="FontStyle" Value="Italic"/>
<Setter Property="Foreground" Value="{StaticResource DisabledText}"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=IsProjectSelected}" Value="True">
<Setter Property="Text" Value="{Binding Path=SelectedProject.Name}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Border>

<Button Grid.Row="3" Grid.Column="1" Content="{x:Static res:UiResources.SelectProjectButton}" Margin="15,0,0,0" Click="SelectProject_OnClick"
IsEnabled="{Binding Path=IsSelectProjectButtonEnabled}"/>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="ButtonColumn"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{x:Static res:UiResources.ProjectToBindLabel}" Margin="0,15,0,5"/>
<Border Grid.Row="1" Grid.Column="0" BorderBrush="{DynamicResource {x:Static vsShell:VsBrushes.ActiveBorderKey}}" BorderThickness="1" Height="30"
Background="{Binding ElementName=ConnectionsCombobox, Path=Background}">
<TextBlock VerticalAlignment="Center" Padding="5,0">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsProjectSelected}" Value="False">
<Setter Property="Text" Value="{x:Static res:UiResources.SelectProjectToBindDescription}"/>
<Setter Property="FontStyle" Value="Italic"/>
<Setter Property="Foreground" Value="{StaticResource DisabledText}"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=IsProjectSelected}" Value="True">
<Setter Property="Text" Value="{Binding Path=SelectedProject.Name}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Border>

<Button Grid.Row="1" Grid.Column="1" Content="{x:Static res:UiResources.SelectProjectButton}" Click="SelectProject_OnClick"
IsEnabled="{Binding Path=IsSelectProjectButtonEnabled}"/>
</Grid>
</Grid>

<Grid Grid.Row="2" Margin="0,10">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
Click="NewConnection_Clicked" />
</Grid>
<ListBox Grid.Row="1" ItemsSource="{Binding Path=ConnectionViewModels, Mode=OneWay}" Margin="0,10"
ItemContainerStyle="{StaticResource NoSelectionListBoxItemStyle}">
ItemContainerStyle="{StaticResource NoSelectionListBoxItemStyle}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="0,5,0,0">
Expand Down Expand Up @@ -90,7 +91,7 @@
</Grid.RowDefinitions>

<TextBlock Grid.Row="0" Grid.RowSpan="2" Text="{Binding Path=Name, Mode=OneWay}"
VerticalAlignment="Center" />
VerticalAlignment="Center" TextWrapping="Wrap" />
<CheckBox Visibility="Collapsed" Grid.Row="1"
Content="{x:Static res:UiResources.SmartNotificationsCheckboxLabel}"
IsChecked="{Binding Path=EnableSmartNotifications}"
Expand Down
Loading