Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
xmlns:vsui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
MinWidth="200"
KeyDown="Adornment_KeyDown"
MouseDown="Adornment_ConsumeMouseEvent"
MouseUp="Adornment_ConsumeMouseEvent"
Expand Down Expand Up @@ -97,13 +96,14 @@
</Grid.ColumnDefinitions>

<imaging:CrispImage Grid.Column="0" Moniker="{Binding StatusImageMoniker}" />
<TextBlock Grid.Column="1" Text="{Binding StatusText}" />
<TextBlock Grid.Column="1" Text="{Binding StatusText}" TextWrapping="Wrap" />
</Grid>

<TextBlock
Text="{Binding SearchText}"
Visibility="{Binding ShowSearchText, Converter={StaticResource BooleanToVisibilityConverter}}"
FontWeight="Light"
TextWrapping="Wrap"
VerticalAlignment="Center"
Margin="0,0,0,5" />

Expand All @@ -125,6 +125,7 @@
Text="{Binding ElementName=control, Path=SubmitText}"
Margin="5, 5, 0, 0"
FontStyle="Italic"
TextWrapping="Wrap"
/>
</StackPanel>
</Border>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ namespace Microsoft.CodeAnalysis.Editor.Implementation.InlineRename
/// </summary>
internal partial class RenameFlyout : InlineRenameAdornment
{
private const int DefaultMinWidth = 200;

private readonly RenameFlyoutViewModel _viewModel;
private readonly IEditorFormatMap _editorFormatMap;
private readonly IWpfTextView _textView;
Expand Down Expand Up @@ -147,8 +149,11 @@ private void PositionAdornment()
? _textView.ViewportRight - width
: desiredLeft;

Canvas.SetTop(this, top);
Canvas.SetLeft(this, left);
MaxWidth = _textView.ViewportRight;
MinWidth = Math.Min(DefaultMinWidth, _textView.ViewportWidth);

Canvas.SetTop(this, Math.Max(0, top));
Canvas.SetLeft(this, Math.Max(0, left));
}

public override void Dispose()
Expand Down
Loading