public void EditBlock(NavBlock block) { this.Block = block; if (block.Content is TextBlock) { this.Title = ((TextBlock)block.Content).Text + " - Properties"; } else { this.Title = block.Content.ToString() + " - Properties"; } this.ShapePopupColorEdit.Color = block.BackgroundColor; this.TextPopupColorEdit.Color = block.ForegroundColor; WindowPositioner.ShowCenteredToMouse(this); //this.ShowDialog(); }
private void OnMouseRightClick(object sender, MouseEventArgs e) { this.Timer.Stop(); if (sender is TreeViewItem) { Object tag = ((TreeViewItem)sender).Header; if (tag is Domain.Attribute) { ModelFilterDialog dialog = new ModelFilterDialog(); dialog.Display((Domain.Attribute)tag); dialog.SearchTextBox.Focus(); WindowPositioner.ShowCenteredToMouse(dialog); AttributeValue value = dialog.Selection; if (value != null && Click != null) { Click(value); } e.Handled = true; } } }