Skip to content

Commit

Permalink
Merge pull request #407 from kaltinril/update_right_click_expose_miss…
Browse files Browse the repository at this point in the history
…ing_locations

Enhancement: Add right-click option to expose variables to labels
  • Loading branch information
vchelaru authored Dec 24, 2024
2 parents 4ce97b1 + 883f295 commit fe25e6a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions WpfDataUi/Controls/ComboBoxDisplay.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public ComboBoxDisplay()
//this.ComboBox.IsEditable = true;

this.RefreshContextMenu(ComboBox.ContextMenu);
this.RefreshContextMenu(TextBlock.ContextMenu);

this.ComboBox.IsKeyboardFocusWithinChanged += HandleIsKeyboardFocusChanged;

Expand Down
7 changes: 6 additions & 1 deletion WpfDataUi/Controls/FileSelectionDisplay.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>

<TextBlock x:Name="Label" MinWidth="100" Padding="4" TextWrapping="Wrap" VerticalAlignment="Center">Property Label:</TextBlock>
<TextBlock x:Name="Label" MinWidth="100" Padding="4" TextWrapping="Wrap" VerticalAlignment="Center">Property Label:
<TextBlock.ContextMenu>
<ContextMenu>
</ContextMenu>
</TextBlock.ContextMenu>
</TextBlock>

<TextBox Grid.Column="1" x:Name="TextBox"
Margin="0,0,51,0" LostFocus="TextBox_LostFocus_1"
Expand Down
2 changes: 2 additions & 0 deletions WpfDataUi/Controls/FileSelectionDisplay.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public FileSelectionDisplay()
mTextBoxLogic = new TextBoxDisplayLogic(this, TextBox);

this.RefreshContextMenu(TextBox.ContextMenu);
this.RefreshContextMenu(Label.ContextMenu);
}


Expand All @@ -96,6 +97,7 @@ public void Refresh(bool forceRefreshEvenIfFocused = false)

this.Label.Text = InstanceMember.DisplayName;
this.RefreshContextMenu(TextBox.ContextMenu);
this.RefreshContextMenu(Label.ContextMenu);

SuppressSettingProperty = false;
}
Expand Down

0 comments on commit fe25e6a

Please sign in to comment.