Browse Source

add documentation to GridViewColumnAutoSize and correct position of tooltip for partly visible cells in TaskView

pull/59/merge
Siegfried Pammer 12 years ago
parent
commit
623cc269fa
  1. 8
      src/Main/Base/Project/Src/Gui/Pads/TaskList/TaskViewResources.xaml.cs
  2. 8
      src/Main/ICSharpCode.Core.Presentation/GridViewColumnAutoSize.cs

8
src/Main/Base/Project/Src/Gui/Pads/TaskList/TaskViewResources.xaml.cs

@ -27,7 +27,13 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -27,7 +27,13 @@ namespace ICSharpCode.SharpDevelop.Gui
var args = new object[] { 0, 0, 0, 0, 0 };
GetLineDetails.Invoke(target, args);
if ((int)args[4] > 0) {
target.ToolTip = new ToolTip { Content = new TextBlock { Text = target.Text, TextWrapping = TextWrapping.Wrap }, PlacementTarget = target, Placement = PlacementMode.Relative };
target.ToolTip = new ToolTip {
Content = new TextBlock { Text = target.Text, TextWrapping = TextWrapping.Wrap },
PlacementTarget = target,
Placement = PlacementMode.Relative,
VerticalOffset = -2,
HorizontalOffset = -6
};
} else {
target.ToolTip = null;
}

8
src/Main/ICSharpCode.Core.Presentation/GridViewColumnAutoSize.cs

@ -9,6 +9,14 @@ using System.Windows.Controls; @@ -9,6 +9,14 @@ using System.Windows.Controls;
namespace ICSharpCode.Core.Presentation
{
/// <summary>
/// This class adds the AutoWidth property to the WPF ListView.
/// It supports a semi-colon-separated list of values, for each defined cell.
/// Each value can either be a fixed size double, or a percentage.
/// The sizes of columns with a percentage will be calculated from the
/// remaining width (after assigning the fixed sizes).
/// Examples: 50%;25%;25% or 30;100%;50
/// </summary>
public class GridViewColumnAutoSize
{
public static readonly DependencyProperty AutoWidthProperty =

Loading…
Cancel
Save