mirror of https://github.com/icsharpcode/ILSpy.git
44 changed files with 670 additions and 1124 deletions
@ -1,112 +0,0 @@ |
|||||||
using System; |
|
||||||
using System.Collections.Generic; |
|
||||||
using System.ComponentModel; |
|
||||||
using System.Linq; |
|
||||||
using System.Reflection; |
|
||||||
using System.Text; |
|
||||||
using System.Threading.Tasks; |
|
||||||
using System.Windows; |
|
||||||
using System.Windows.Controls; |
|
||||||
using System.Windows.Data; |
|
||||||
using System.Windows.Input; |
|
||||||
using System.Windows.Media; |
|
||||||
|
|
||||||
namespace ICSharpCode.ILSpy.Controls |
|
||||||
{ |
|
||||||
class FilterableGridViewColumn : SortableGridViewColumn |
|
||||||
{ |
|
||||||
static readonly ComponentResourceKey headerTemplateKey = new ComponentResourceKey(typeof(FilterableGridViewColumn), "ColumnHeaderTemplate"); |
|
||||||
|
|
||||||
|
|
||||||
public FilterableGridViewColumn() |
|
||||||
{ |
|
||||||
this.SetValueToExtension(HeaderTemplateProperty, new DynamicResourceExtension(headerTemplateKey)); |
|
||||||
} |
|
||||||
|
|
||||||
string filterBy; |
|
||||||
|
|
||||||
public string FilterBy { |
|
||||||
get { return filterBy; } |
|
||||||
set { |
|
||||||
if (filterBy != value) { |
|
||||||
filterBy = value; |
|
||||||
OnPropertyChanged(new PropertyChangedEventArgs("FilterBy")); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
string filterFormatString; |
|
||||||
|
|
||||||
public string FilterFormatString { |
|
||||||
get { return filterFormatString; } |
|
||||||
set { |
|
||||||
if (filterFormatString != value) { |
|
||||||
filterFormatString = value; |
|
||||||
OnPropertyChanged(new PropertyChangedEventArgs("FilterFormatString")); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public static ListView GetParentView(DependencyObject obj) |
|
||||||
{ |
|
||||||
return (ListView)obj.GetValue(ParentViewProperty); |
|
||||||
} |
|
||||||
|
|
||||||
public static void SetParentView(DependencyObject obj, ListView value) |
|
||||||
{ |
|
||||||
obj.SetValue(ParentViewProperty, value); |
|
||||||
} |
|
||||||
|
|
||||||
public static readonly DependencyProperty ParentViewProperty = |
|
||||||
DependencyProperty.RegisterAttached("ParentView", typeof(ListView), typeof(FilterableGridViewColumn), new PropertyMetadata(null)); |
|
||||||
|
|
||||||
public string FilterExpression { |
|
||||||
get { return (string)GetValue(FilterExpressionProperty); } |
|
||||||
set { SetValue(FilterExpressionProperty, value); } |
|
||||||
} |
|
||||||
|
|
||||||
public static readonly DependencyProperty FilterExpressionProperty = |
|
||||||
DependencyProperty.Register("FilterExpression", typeof(string), typeof(FilterableGridViewColumn), new PropertyMetadata(null, OnFilterExpressionChanged)); |
|
||||||
|
|
||||||
private static void OnFilterExpressionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) |
|
||||||
{ |
|
||||||
var header = d as FilterableGridViewColumn; |
|
||||||
var view = GetParentView(header); |
|
||||||
if (header == null || view == null) |
|
||||||
return; |
|
||||||
header.Filter(view, e.NewValue as string); |
|
||||||
} |
|
||||||
|
|
||||||
void Filter(ListView grid, string filterExpression) |
|
||||||
{ |
|
||||||
ColumnSortDirection currentDirection = GetSortDirection(grid); |
|
||||||
ICollectionView dataView = CollectionViewSource.GetDefaultView(grid.ItemsSource); |
|
||||||
|
|
||||||
if (dataView == null) return; |
|
||||||
|
|
||||||
string filterBy = FilterBy; |
|
||||||
if (filterBy == null) { |
|
||||||
Binding binding = DisplayMemberBinding as Binding; |
|
||||||
if (binding != null && binding.Path != null) { |
|
||||||
filterBy = binding.Path.Path; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
dataView.Filter = delegate (object item) { |
|
||||||
if (filterBy == null) |
|
||||||
return true; |
|
||||||
var pInfo = item.GetType().GetProperty(filterBy); |
|
||||||
if (pInfo == null) |
|
||||||
return false; |
|
||||||
return Matches(filterExpression, string.Format("{0:" + FilterFormatString + "}", pInfo.GetValue(item))); |
|
||||||
}; |
|
||||||
|
|
||||||
dataView.Refresh(); |
|
||||||
} |
|
||||||
|
|
||||||
bool Matches(string filterExpression, string value) |
|
||||||
{ |
|
||||||
return value?.Contains(filterExpression) == true; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -0,0 +1,38 @@ |
|||||||
|
// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
// software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||||
|
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
// substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||||
|
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||||
|
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
using System.Windows; |
||||||
|
using System.Windows.Controls; |
||||||
|
using System.Windows.Data; |
||||||
|
using System.Windows.Media; |
||||||
|
|
||||||
|
namespace ICSharpCode.ILSpy.Metadata |
||||||
|
{ |
||||||
|
class DataGridCustomTextColumn : DataGridTextColumn |
||||||
|
{ |
||||||
|
public BindingBase ToolTipBinding { get; set; } |
||||||
|
|
||||||
|
protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) |
||||||
|
{ |
||||||
|
TextBox textBox = new TextBox() { Style = (Style)MetadataTableViews.Instance["DataGridCustomTextColumnTextBoxStyle"] }; |
||||||
|
BindingOperations.SetBinding(textBox, TextBox.TextProperty, Binding); |
||||||
|
BindingOperations.SetBinding(textBox, TextBox.ToolTipProperty, ToolTipBinding); |
||||||
|
return textBox; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -1,122 +0,0 @@ |
|||||||
// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
|
||||||
// software and associated documentation files (the "Software"), to deal in the Software
|
|
||||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
|
||||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
|
||||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all copies or
|
|
||||||
// substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
||||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
||||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
||||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
// DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
using System.Windows; |
|
||||||
using System.Windows.Controls; |
|
||||||
using System.Windows.Data; |
|
||||||
|
|
||||||
namespace ICSharpCode.ILSpy.Metadata |
|
||||||
{ |
|
||||||
public class HandleTemplate : DataTemplateSelector |
|
||||||
{ |
|
||||||
public string ValueStringFormat { get; set; } = "X8"; |
|
||||||
public string ValuePropertyName { get; set; } |
|
||||||
public string TooltipPropertyName { get; set; } |
|
||||||
|
|
||||||
private DataTemplate template; |
|
||||||
|
|
||||||
public override DataTemplate SelectTemplate(object item, DependencyObject container) |
|
||||||
{ |
|
||||||
if (template != null) |
|
||||||
return template; |
|
||||||
var textBlock = new FrameworkElementFactory(typeof(TextBlock), "textBlock"); |
|
||||||
textBlock.SetValue(FrameworkElement.MarginProperty, new Thickness(3, 1, 0, 0)); |
|
||||||
textBlock.SetBinding(TextBlock.TextProperty, new Binding(ValuePropertyName) { StringFormat = ValueStringFormat }); |
|
||||||
var textBox = new FrameworkElementFactory(typeof(TextBox), "textBox"); |
|
||||||
textBox.SetBinding(TextBox.TextProperty, new Binding(ValuePropertyName) { StringFormat = ValueStringFormat, Mode = BindingMode.OneWay }); |
|
||||||
textBox.SetValue(TextBox.VisibilityProperty, Visibility.Hidden); |
|
||||||
textBox.SetValue(TextBox.IsReadOnlyCaretVisibleProperty, true); |
|
||||||
textBox.SetValue(TextBox.IsReadOnlyProperty, true); |
|
||||||
if (TooltipPropertyName != null) |
|
||||||
textBox.SetBinding(FrameworkElement.ToolTipProperty, new Binding(TooltipPropertyName)); |
|
||||||
var grid = new FrameworkElementFactory(typeof(Grid)); |
|
||||||
grid.AppendChild(textBlock); |
|
||||||
grid.AppendChild(textBox); |
|
||||||
template = new DataTemplate { |
|
||||||
VisualTree = grid, |
|
||||||
Triggers = { |
|
||||||
new Trigger { |
|
||||||
Property = UIElement.IsMouseOverProperty, |
|
||||||
Value = true, |
|
||||||
Setters = { |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Visible, "textBox"), |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Hidden, "textBlock"), |
|
||||||
} |
|
||||||
}, |
|
||||||
new Trigger { |
|
||||||
Property = UIElement.IsKeyboardFocusWithinProperty, |
|
||||||
Value = true, |
|
||||||
Setters = { |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Visible, "textBox"), |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Hidden, "textBlock"), |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
}; |
|
||||||
return template; |
|
||||||
} |
|
||||||
} |
|
||||||
public class EnumTemplate : DataTemplateSelector |
|
||||||
{ |
|
||||||
public string ValuePropertyName { get; set; } |
|
||||||
public string TooltipPropertyName { get; set; } |
|
||||||
|
|
||||||
private DataTemplate template; |
|
||||||
|
|
||||||
public override DataTemplate SelectTemplate(object item, DependencyObject container) |
|
||||||
{ |
|
||||||
if (template != null) |
|
||||||
return template; |
|
||||||
var textBlock = new FrameworkElementFactory(typeof(TextBlock), "textBlock"); |
|
||||||
textBlock.SetValue(FrameworkElement.MarginProperty, new Thickness(3, 1, 0, 0)); |
|
||||||
textBlock.SetBinding(TextBlock.TextProperty, new Binding(ValuePropertyName)); |
|
||||||
var textBox = new FrameworkElementFactory(typeof(TextBox), "textBox"); |
|
||||||
textBox.SetBinding(TextBox.TextProperty, new Binding(ValuePropertyName) { Mode = BindingMode.OneWay }); |
|
||||||
textBox.SetValue(TextBox.VisibilityProperty, Visibility.Hidden); |
|
||||||
textBox.SetValue(TextBox.IsReadOnlyCaretVisibleProperty, true); |
|
||||||
textBox.SetValue(TextBox.IsReadOnlyProperty, true); |
|
||||||
if (TooltipPropertyName != null) |
|
||||||
textBox.SetBinding(FrameworkElement.ToolTipProperty, new Binding(TooltipPropertyName)); |
|
||||||
var grid = new FrameworkElementFactory(typeof(Grid)); |
|
||||||
grid.AppendChild(textBlock); |
|
||||||
grid.AppendChild(textBox); |
|
||||||
template = new DataTemplate { |
|
||||||
VisualTree = grid, |
|
||||||
Triggers = { |
|
||||||
new Trigger { |
|
||||||
Property = UIElement.IsMouseOverProperty, |
|
||||||
Value = true, |
|
||||||
Setters = { |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Visible, "textBox"), |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Hidden, "textBlock"), |
|
||||||
} |
|
||||||
}, |
|
||||||
new Trigger { |
|
||||||
Property = UIElement.IsKeyboardFocusWithinProperty, |
|
||||||
Value = true, |
|
||||||
Setters = { |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Visible, "textBox"), |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Hidden, "textBlock"), |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
}; |
|
||||||
return template; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -0,0 +1,36 @@ |
|||||||
|
<Control x:Class="ICSharpCode.ILSpy.Metadata.FlagsFilterControl" |
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
||||||
|
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Metadata" |
||||||
|
xmlns:dgx="urn:tom-englert.de/DataGridExtensions" |
||||||
|
mc:Ignorable="d" |
||||||
|
d:DesignHeight="450" d:DesignWidth="800"> |
||||||
|
<Control.Template> |
||||||
|
<ControlTemplate> |
||||||
|
<Grid> |
||||||
|
<ToggleButton x:Name="ToggleButton"> |
||||||
|
<ToggleButton.Template> |
||||||
|
<ControlTemplate> |
||||||
|
<Border Background="#01010101"> |
||||||
|
<Control x:Name="FilterSymbol" Style="{DynamicResource {x:Static dgx:DataGridFilter.IconStyleKey}}" /> |
||||||
|
</Border> |
||||||
|
</ControlTemplate> |
||||||
|
</ToggleButton.Template> |
||||||
|
</ToggleButton> |
||||||
|
<Popup d:DataContext="{d:DesignInstance dgx:DataGridFilterColumnControl}" |
||||||
|
x:Name="Popup" IsOpen="{Binding Path=IsChecked, ElementName=ToggleButton, Mode=TwoWay}" |
||||||
|
AllowsTransparency="True" StaysOpen="False"> |
||||||
|
<ListBox x:Name="ListBox" SelectionMode="Extended" SelectionChanged="ListBox_SelectionChanged"> |
||||||
|
<ListBox.ItemTemplate> |
||||||
|
<DataTemplate> |
||||||
|
<CheckBox DockPanel.Dock="Left" Margin="3,2" Content="{Binding Name}" IsChecked="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}"/> |
||||||
|
</DataTemplate> |
||||||
|
</ListBox.ItemTemplate> |
||||||
|
</ListBox> |
||||||
|
</Popup> |
||||||
|
</Grid> |
||||||
|
</ControlTemplate> |
||||||
|
</Control.Template> |
||||||
|
</Control> |
||||||
@ -0,0 +1,115 @@ |
|||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.Linq; |
||||||
|
using System.Reflection; |
||||||
|
using System.Windows; |
||||||
|
using System.Windows.Controls; |
||||||
|
using DataGridExtensions; |
||||||
|
|
||||||
|
namespace ICSharpCode.ILSpy.Metadata |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for FlagsFilterControl.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class FlagsFilterControl |
||||||
|
{ |
||||||
|
ListBox listBox; |
||||||
|
|
||||||
|
public FlagsFilterControl() |
||||||
|
{ |
||||||
|
InitializeComponent(); |
||||||
|
} |
||||||
|
|
||||||
|
public FlagsContentFilter Filter { |
||||||
|
get { return (FlagsContentFilter)GetValue(FilterProperty); } |
||||||
|
set { SetValue(FilterProperty, value); } |
||||||
|
} |
||||||
|
|
||||||
|
public Type FlagsType { get; set; } |
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Identifies the Filter dependency property
|
||||||
|
/// </summary>
|
||||||
|
public static readonly DependencyProperty FilterProperty = |
||||||
|
DependencyProperty.Register("Filter", typeof(FlagsContentFilter), typeof(FlagsFilterControl), |
||||||
|
new FrameworkPropertyMetadata(new FlagsContentFilter(-1), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, (sender, e) => ((FlagsFilterControl)sender).Filter_Changed())); |
||||||
|
|
||||||
|
/// <summary>When overridden in a derived class, is invoked whenever application code or internal processes call <see cref="M:System.Windows.FrameworkElement.ApplyTemplate" />.</summary>
|
||||||
|
public override void OnApplyTemplate() |
||||||
|
{ |
||||||
|
base.OnApplyTemplate(); |
||||||
|
|
||||||
|
listBox = Template.FindName("ListBox", this) as ListBox; |
||||||
|
listBox.ItemsSource = CreateFlags(FlagsType); |
||||||
|
|
||||||
|
var filter = Filter; |
||||||
|
|
||||||
|
if (filter == null || filter.Mask == -1) { |
||||||
|
listBox?.SelectAll(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
internal static IEnumerable<Flag> CreateFlags(Type flagsType, bool includeAll = true) |
||||||
|
{ |
||||||
|
if (includeAll) |
||||||
|
yield return new Flag("<All>", -1); |
||||||
|
|
||||||
|
foreach (var item in flagsType.GetFields(BindingFlags.Static | BindingFlags.Public)) { |
||||||
|
if (item.Name.EndsWith("Mask", StringComparison.Ordinal)) |
||||||
|
continue; |
||||||
|
int value = (int)item.GetRawConstantValue(); |
||||||
|
yield return new Flag($"{item.Name} ({value:X4})", value); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private void Filter_Changed() |
||||||
|
{ |
||||||
|
var filter = Filter; |
||||||
|
|
||||||
|
if (filter == null || filter.Mask == -1) { |
||||||
|
listBox?.SelectAll(); |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
if (listBox?.SelectedItems.Count != 0) |
||||||
|
return; |
||||||
|
|
||||||
|
foreach (var item in listBox.Items.Cast<Flag>()) { |
||||||
|
if ((item.Value & filter.Mask) != 0 || item.Value == 0) { |
||||||
|
listBox.SelectedItems.Add(item); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) |
||||||
|
{ |
||||||
|
if (e.RemovedItems?.OfType<Flag>().Any(f => f.Value == -1) == true) { |
||||||
|
Filter = new FlagsContentFilter(0); |
||||||
|
listBox.UnselectAll(); |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
int mask = 0; |
||||||
|
foreach (var item in listBox.SelectedItems.Cast<Flag>()) { |
||||||
|
mask |= item.Value; |
||||||
|
} |
||||||
|
|
||||||
|
Filter = new FlagsContentFilter(mask); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public class FlagsContentFilter : IContentFilter |
||||||
|
{ |
||||||
|
public int Mask { get; } |
||||||
|
|
||||||
|
public FlagsContentFilter(int mask) |
||||||
|
{ |
||||||
|
this.Mask = mask; |
||||||
|
} |
||||||
|
|
||||||
|
public bool IsMatch(object value) |
||||||
|
{ |
||||||
|
return (Mask & (int)value) != 0; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,24 @@ |
|||||||
|
<Control x:Class="ICSharpCode.ILSpy.Metadata.FlagsTooltip" |
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
||||||
|
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Metadata" |
||||||
|
x:Name="root" |
||||||
|
mc:Ignorable="d" |
||||||
|
d:DesignHeight="450" d:DesignWidth="800"> |
||||||
|
<Control.Resources> |
||||||
|
<local:FlagActiveConverter x:Key="flagActiveConv" /> |
||||||
|
</Control.Resources> |
||||||
|
<Control.Template> |
||||||
|
<ControlTemplate> |
||||||
|
<ListBox ItemsSource="{Binding Flags, ElementName=root}"> |
||||||
|
<ListBox.ItemTemplate> |
||||||
|
<DataTemplate> |
||||||
|
<CheckBox DockPanel.Dock="Left" Margin="3,2" Content="{Binding Name}" IsChecked="{Binding Value, Converter={StaticResource flagActiveConv}, Mode=OneWay}"/> |
||||||
|
</DataTemplate> |
||||||
|
</ListBox.ItemTemplate> |
||||||
|
</ListBox> |
||||||
|
</ControlTemplate> |
||||||
|
</Control.Template> |
||||||
|
</Control> |
||||||
@ -0,0 +1,66 @@ |
|||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.Globalization; |
||||||
|
using System.Linq; |
||||||
|
using System.Text; |
||||||
|
using System.Threading.Tasks; |
||||||
|
using System.Windows; |
||||||
|
using System.Windows.Controls; |
||||||
|
using System.Windows.Data; |
||||||
|
using System.Windows.Documents; |
||||||
|
using System.Windows.Input; |
||||||
|
using System.Windows.Media; |
||||||
|
using System.Windows.Media.Imaging; |
||||||
|
using System.Windows.Navigation; |
||||||
|
using System.Windows.Shapes; |
||||||
|
|
||||||
|
namespace ICSharpCode.ILSpy.Metadata |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for FlagsTooltip.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class FlagsTooltip |
||||||
|
{ |
||||||
|
public FlagsTooltip(int value, Type flagsType) |
||||||
|
{ |
||||||
|
this.Flags = FlagsFilterControl.CreateFlags(flagsType, includeAll: false); |
||||||
|
InitializeComponent(); |
||||||
|
((FlagActiveConverter)Resources["flagActiveConv"]).Value = value; |
||||||
|
} |
||||||
|
|
||||||
|
public IEnumerable<Flag> Flags { get; } |
||||||
|
} |
||||||
|
|
||||||
|
class FlagActiveConverter : DependencyObject, IValueConverter |
||||||
|
{ |
||||||
|
public int Value { |
||||||
|
get { return (int)GetValue(ValueProperty); } |
||||||
|
set { SetValue(ValueProperty, value); } |
||||||
|
} |
||||||
|
|
||||||
|
public static readonly DependencyProperty ValueProperty = |
||||||
|
DependencyProperty.Register("Value", typeof(int), typeof(FlagActiveConverter), new PropertyMetadata(0)); |
||||||
|
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
||||||
|
{ |
||||||
|
return Value == (int)value || ((int)value & Value) != 0; |
||||||
|
} |
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
||||||
|
{ |
||||||
|
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public readonly struct Flag |
||||||
|
{ |
||||||
|
public string Name { get; } |
||||||
|
public int Value { get; } |
||||||
|
|
||||||
|
public Flag(string name, int value) |
||||||
|
{ |
||||||
|
this.Name = name; |
||||||
|
this.Value = value; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,32 @@ |
|||||||
|
<Control x:Class="ICSharpCode.ILSpy.Metadata.HexFilterControl" |
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
||||||
|
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Metadata" |
||||||
|
xmlns:dgx="urn:tom-englert.de/DataGridExtensions" |
||||||
|
mc:Ignorable="d" |
||||||
|
d:DesignHeight="450" d:DesignWidth="800"> |
||||||
|
<Control.Template> |
||||||
|
<ControlTemplate> |
||||||
|
<Grid> |
||||||
|
<Control Style="{DynamicResource {x:Static dgx:DataGridFilter.IconStyleKey}}"/> |
||||||
|
<StackPanel x:Name="inputPanel" Orientation="Horizontal" Margin="4,0,0,0"> |
||||||
|
<TextBlock Text="0x"/> |
||||||
|
<TextBox x:Name="textBox" TextChanged="TextBox_TextChanged" MinWidth="20" Style="{DynamicResource {x:Static dgx:DataGridFilter.ColumnHeaderSearchTextBoxStyleKey}}" /> |
||||||
|
</StackPanel> |
||||||
|
</Grid> |
||||||
|
<ControlTemplate.Triggers> |
||||||
|
<Trigger SourceName="textBox" Property="Text" Value=""> |
||||||
|
<Setter TargetName="inputPanel" Property="Opacity" Value="0"/> |
||||||
|
</Trigger> |
||||||
|
<Trigger Property="IsMouseOver" Value="True"> |
||||||
|
<Setter TargetName="inputPanel" Property="Opacity" Value="1"/> |
||||||
|
</Trigger> |
||||||
|
<Trigger SourceName="textBox" Property="IsFocused" Value="True"> |
||||||
|
<Setter TargetName="inputPanel" Property="Opacity" Value="1"/> |
||||||
|
</Trigger> |
||||||
|
</ControlTemplate.Triggers> |
||||||
|
</ControlTemplate> |
||||||
|
</Control.Template> |
||||||
|
</Control> |
||||||
@ -0,0 +1,84 @@ |
|||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.Linq; |
||||||
|
using System.Text; |
||||||
|
using System.Threading.Tasks; |
||||||
|
using System.Windows; |
||||||
|
using System.Windows.Controls; |
||||||
|
using System.Windows.Data; |
||||||
|
using System.Windows.Documents; |
||||||
|
using System.Windows.Input; |
||||||
|
using System.Windows.Media; |
||||||
|
using System.Windows.Media.Imaging; |
||||||
|
using System.Windows.Navigation; |
||||||
|
using System.Windows.Shapes; |
||||||
|
using DataGridExtensions; |
||||||
|
|
||||||
|
namespace ICSharpCode.ILSpy.Metadata |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for HexFilterControl.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class HexFilterControl |
||||||
|
{ |
||||||
|
TextBox textBox; |
||||||
|
|
||||||
|
public HexFilterControl() |
||||||
|
{ |
||||||
|
InitializeComponent(); |
||||||
|
} |
||||||
|
|
||||||
|
public override void OnApplyTemplate() |
||||||
|
{ |
||||||
|
base.OnApplyTemplate(); |
||||||
|
textBox = Template.FindName("textBox", this) as TextBox; |
||||||
|
} |
||||||
|
|
||||||
|
private void TextBox_TextChanged(object sender, TextChangedEventArgs e) |
||||||
|
{ |
||||||
|
var text = ((TextBox)sender)?.Text; |
||||||
|
|
||||||
|
Filter = new ContentFilter(text); |
||||||
|
} |
||||||
|
|
||||||
|
public IContentFilter Filter { |
||||||
|
get { return (IContentFilter)GetValue(FilterProperty); } |
||||||
|
set { SetValue(FilterProperty, value); } |
||||||
|
} |
||||||
|
/// <summary>
|
||||||
|
/// Identifies the Filter dependency property
|
||||||
|
/// </summary>
|
||||||
|
public static readonly DependencyProperty FilterProperty = |
||||||
|
DependencyProperty.Register("Filter", typeof(IContentFilter), typeof(HexFilterControl), |
||||||
|
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, (o, args) => ((HexFilterControl)o).Filter_Changed(args.NewValue))); |
||||||
|
|
||||||
|
void Filter_Changed(object newValue) |
||||||
|
{ |
||||||
|
var textBox = this.textBox; |
||||||
|
if (textBox == null) |
||||||
|
return; |
||||||
|
|
||||||
|
textBox.Text = (newValue as ContentFilter)?.Value ?? string.Empty; |
||||||
|
} |
||||||
|
|
||||||
|
class ContentFilter : IContentFilter |
||||||
|
{ |
||||||
|
readonly string filter; |
||||||
|
|
||||||
|
public ContentFilter(string filter) |
||||||
|
{ |
||||||
|
this.filter = filter; |
||||||
|
} |
||||||
|
|
||||||
|
public bool IsMatch(object value) |
||||||
|
{ |
||||||
|
if (value == null) |
||||||
|
return false; |
||||||
|
|
||||||
|
return string.Format("{0:x8}", value).IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0; |
||||||
|
} |
||||||
|
|
||||||
|
public string Value => filter; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -1,660 +1,58 @@ |
|||||||
<ResourceDictionary x:Class="ICSharpCode.ILSpy.Metadata.MetadataTableViews" |
<ResourceDictionary x:Class="ICSharpCode.ILSpy.Metadata.MetadataTableViews" |
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
||||||
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls" |
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls" |
||||||
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Metadata"> |
xmlns:local="clr-namespace:ICSharpCode.ILSpy.Metadata" |
||||||
|
xmlns:reflection="clr-namespace:System.Reflection;assembly=mscorlib" |
||||||
<Style x:Key="ItemContainerStyle" TargetType="ListViewItem"> |
xmlns:dgx="urn:tom-englert.de/DataGridExtensions"> |
||||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/> |
|
||||||
|
<Style x:Key="DataGridCustomTextColumnTextBoxStyle" TargetType="TextBox"> |
||||||
|
<Setter Property="IsReadOnly" Value="True" /> |
||||||
|
<Setter Property="IsReadOnlyCaretVisible" Value="True" /> |
||||||
|
<Setter Property="Padding" Value="2" /> |
||||||
|
<Style.Triggers> |
||||||
|
<MultiTrigger> |
||||||
|
<MultiTrigger.Conditions> |
||||||
|
<Condition Property="IsMouseOver" Value="False" /> |
||||||
|
<Condition Property="IsFocused" Value="False" /> |
||||||
|
</MultiTrigger.Conditions> |
||||||
|
<Setter Property="BorderBrush" Value="Transparent" /> |
||||||
|
<Setter Property="Background" Value="Transparent" /> |
||||||
|
</MultiTrigger> |
||||||
|
<MultiDataTrigger> |
||||||
|
<MultiDataTrigger.Conditions> |
||||||
|
<Condition Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=DataGridCell}}" Value="True" /> |
||||||
|
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Mode=Self}}" Value="False" /> |
||||||
|
<Condition Binding="{Binding IsFocused, RelativeSource={RelativeSource Mode=Self}}" Value="False" /> |
||||||
|
</MultiDataTrigger.Conditions> |
||||||
|
<Setter Property="Foreground" Value="White" /> |
||||||
|
</MultiDataTrigger> |
||||||
|
</Style.Triggers> |
||||||
</Style> |
</Style> |
||||||
|
|
||||||
<DataTemplate x:Key="RowIDDataTemplate"> |
<ControlTemplate x:Key="DefaultFilter"> |
||||||
<Grid> |
<Grid> |
||||||
<TextBlock Margin="3,1,0,0" x:Name="textBlock" Text="{Binding RID}" /> |
<Control Style="{DynamicResource {x:Static dgx:DataGridFilter.IconStyleKey}}" /> |
||||||
<TextBox x:Name="textBox" Text="{Binding RID, Mode=OneWay}" Visibility="Hidden" IsReadOnly="True" IsReadOnlyCaretVisible="True" /> |
<TextBox Style="{DynamicResource {x:Static dgx:DataGridFilter.ColumnHeaderSearchTextBoxStyleKey}}" |
||||||
|
Text="{Binding Path=Filter, UpdateSourceTrigger=PropertyChanged}" /> |
||||||
</Grid> |
</Grid> |
||||||
<DataTemplate.Triggers> |
</ControlTemplate> |
||||||
<Trigger Property="IsMouseOver" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
<Trigger Property="IsKeyboardFocusWithin" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
</DataTemplate.Triggers> |
|
||||||
</DataTemplate> |
|
||||||
|
|
||||||
<DataTemplate x:Key="OffsetDataTemplate"> |
|
||||||
<Grid> |
|
||||||
<TextBlock Margin="3,1,0,0" x:Name="textBlock" Text="{Binding Offset, StringFormat=X8}" /> |
|
||||||
<TextBox x:Name="textBox" Text="{Binding Offset, Mode=OneWay, StringFormat=X8}" Visibility="Hidden" IsReadOnly="True" IsReadOnlyCaretVisible="True" /> |
|
||||||
</Grid> |
|
||||||
<DataTemplate.Triggers> |
|
||||||
<Trigger Property="IsMouseOver" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
<Trigger Property="IsKeyboardFocusWithin" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
</DataTemplate.Triggers> |
|
||||||
</DataTemplate> |
|
||||||
|
|
||||||
<local:ByteWidthConverter x:Key="byteWidthConverter" /> |
|
||||||
|
|
||||||
<local:HandleTemplate x:Key="DefinitionHandleDataTemplate" ValuePropertyName="Token" /> |
|
||||||
|
|
||||||
<local:StringHandleTemplate x:Key="NameStringHandleDataTemplate" ValuePropertyName="Name" HandlePropertyName="NameStringHandle" /> |
|
||||||
<local:StringHandleTemplate x:Key="NamespaceStringHandleDataTemplate" ValuePropertyName="Namespace" HandlePropertyName="NamespaceStringHandle" /> |
|
||||||
|
|
||||||
<local:HandleTemplate x:Key="SignatureBlobHandleDataTemplate" TooltipPropertyName="SignatureTooltip" ValuePropertyName="Signature" ValueStringFormat="X" /> |
|
||||||
<local:HandleTemplate x:Key="ValueBlobHandleDataTemplate" TooltipPropertyName="ValueTooltip" ValuePropertyName="Value" ValueStringFormat="X" /> |
|
||||||
|
|
||||||
<GridView x:Key="EntryView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="Member" SortBy="Member" FilterBy="Member"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<Grid> |
|
||||||
<TextBlock Margin="3,1,0,0" x:Name="textBlock" Text="{Binding Member}" /> |
|
||||||
<TextBox x:Name="textBox" Text="{Binding Member, Mode=OneWay}" Visibility="Hidden" IsReadOnly="True" IsReadOnlyCaretVisible="True" /> |
|
||||||
</Grid> |
|
||||||
<DataTemplate.Triggers> |
|
||||||
<Trigger Property="IsMouseOver" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
<Trigger Property="IsKeyboardFocusWithin" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
</DataTemplate.Triggers> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Size" SortBy="Size" FilterBy="Size"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<Grid> |
|
||||||
<TextBlock Margin="3,1,0,0" x:Name="textBlock" Text="{Binding Size}" /> |
|
||||||
<TextBox x:Name="textBox" Text="{Binding Size, Mode=OneWay}" Visibility="Hidden" IsReadOnly="True" IsReadOnlyCaretVisible="True" /> |
|
||||||
</Grid> |
|
||||||
<DataTemplate.Triggers> |
|
||||||
<Trigger Property="IsMouseOver" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
<Trigger Property="IsKeyboardFocusWithin" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
</DataTemplate.Triggers> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Value" SortBy="Value" FilterBy="Value"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<Grid> |
|
||||||
<TextBlock Margin="3,1,0,0" x:Name="textBlock" Text="{Binding ., Converter={StaticResource byteWidthConverter}}" /> |
|
||||||
<TextBox x:Name="textBox" Text="{Binding ., Mode=OneWay, Converter={StaticResource byteWidthConverter}}" Visibility="Hidden" IsReadOnly="True" IsReadOnlyCaretVisible="True" /> |
|
||||||
</Grid> |
|
||||||
<DataTemplate.Triggers> |
|
||||||
<Trigger Property="IsMouseOver" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
<Trigger Property="IsKeyboardFocusWithin" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
</DataTemplate.Triggers> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Meaning" SortBy="Meaning" FilterBy="Meaning"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<Grid> |
|
||||||
<TextBlock Margin="3,1,0,0" x:Name="textBlock" Text="{Binding Meaning}" /> |
|
||||||
<TextBox x:Name="textBox" Text="{Binding Meaning, Mode=OneWay}" Visibility="Hidden" IsReadOnly="True" IsReadOnlyCaretVisible="True" /> |
|
||||||
</Grid> |
|
||||||
<DataTemplate.Triggers> |
|
||||||
<Trigger Property="IsMouseOver" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
<Trigger Property="IsKeyboardFocusWithin" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
</DataTemplate.Triggers> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="ModulesView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Generation" SortBy="Generation" FilterBy="Generation"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Generation}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Mvid" SortBy="Mvid" FilterBy="Mvid"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Mvid, StringFormat=X}" ToolTip="{Binding MvidTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="GenerationId" SortBy="GenerationId" FilterBy="GenerationId"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding GenerationId, StringFormat=X}" ToolTip="{Binding GenerationIdTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="BaseGenerationId" SortBy="BaseGenerationId" FilterBy="BaseGenerationId"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding BaseGenerationId, StringFormat=X}" ToolTip="{Binding BaseGenerationIdTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="ModuleRefsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}" /> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="TypeRefsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="ResolutionScope" SortBy="ResolutionScope" FilterBy="ResolutionScope"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="ResolutionScope" TooltipPropertyName="ResolutionScopeSignature" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}" /> |
|
||||||
<controls:FilterableGridViewColumn Header="Namespace" SortBy="Namespace" FilterBy="Namespace" CellTemplateSelector="{StaticResource NamespaceStringHandleDataTemplate}"/> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="TypeDefsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Attributes" SortBy="Attributes" FilterBy="Attributes"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Attributes, StringFormat=X8}" ToolTip="{Binding AttributesTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Namespace" SortBy="Namespace" FilterBy="Namespace" CellTemplateSelector="{StaticResource NamespaceStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="BaseType" SortBy="BaseType" FilterBy="BaseType"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="BaseType" TooltipPropertyName="BaseTypeSignature" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="FieldList" SortBy="FieldList" FilterBy="FieldList"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding FieldList, StringFormat=X}" ToolTip="{Binding FieldListTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="MethodList" SortBy="MethodList" FilterBy="MethodList"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding MethodList, StringFormat=X}" ToolTip="{Binding MethodListTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="TypeSpecsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Signature" SortBy="Signature" FilterBy="Signature" CellTemplateSelector="{StaticResource SignatureBlobHandleDataTemplate}"/> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="FieldDefsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Attributes" SortBy="Attributes" FilterBy="Attributes"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Attributes, StringFormat=X8}" ToolTip="{Binding AttributesTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Signature" SortBy="Signature" FilterBy="Signature" CellTemplateSelector="{StaticResource SignatureBlobHandleDataTemplate}"/> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="MethodDefsView" AllowsColumnReorder="False"> |
<ControlTemplate x:Key="HexFilter"> |
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
<local:HexFilterControl Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" /> |
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
</ControlTemplate> |
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Attributes" SortBy="Attributes" FilterBy="Attributes"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Attributes, StringFormat=X8}" ToolTip="{Binding AttributesTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Signature" SortBy="Signature" FilterBy="Signature" CellTemplateSelector="{StaticResource SignatureBlobHandleDataTemplate}"/> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="EventDefsView" AllowsColumnReorder="False"> |
<ControlTemplate x:Key="MethodAttributesFilter"> |
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
<local:FlagsFilterControl FlagsType="{x:Type reflection:MethodAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" /> |
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
</ControlTemplate> |
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Attributes" SortBy="Attributes" FilterBy="Attributes"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Attributes, StringFormat=X8}" ToolTip="{Binding AttributesTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Type" SortBy="Type" FilterBy="Type"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="Type" TooltipPropertyName="TypeTooltip" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="PropertyDefsView" AllowsColumnReorder="False"> |
<ControlTemplate x:Key="MethodImplAttributesFilter"> |
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
<local:FlagsFilterControl FlagsType="{x:Type reflection:MethodImplAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" /> |
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
</ControlTemplate> |
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Attributes" SortBy="Attributes" FilterBy="Attributes"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Attributes, StringFormat=X8}" ToolTip="{Binding AttributesTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Signature" SortBy="Signature" FilterBy="Signature" CellTemplateSelector="{StaticResource SignatureBlobHandleDataTemplate}"/> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="AssemblyView" AllowsColumnReorder="False"> |
<Style x:Key="ItemContainerStyle" TargetType="ListViewItem"> |
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
<Setter Property="HorizontalContentAlignment" Value="Stretch"/> |
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
</Style> |
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="HashAlgorithm" SortBy="HashAlgorithm" FilterBy="HashAlgorithm"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:EnumTemplate ValuePropertyName="HashAlgorithm" TooltipPropertyName="HashAlgorithmTooltip"/> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Flags" SortBy="Flags" FilterBy="Flags"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:EnumTemplate ValuePropertyName="Flags" TooltipPropertyName="FlagsTooltip"/> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Version" SortBy="Version" FilterBy="Version"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<Grid> |
|
||||||
<TextBlock Margin="3,1,0,0" x:Name="textBlock" Text="{Binding Version}" /> |
|
||||||
<TextBox x:Name="textBox" Text="{Binding Version, Mode=OneWay}" Visibility="Hidden" IsReadOnly="True" IsReadOnlyCaretVisible="True" /> |
|
||||||
</Grid> |
|
||||||
<DataTemplate.Triggers> |
|
||||||
<Trigger Property="IsMouseOver" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
<Trigger Property="IsKeyboardFocusWithin" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
</DataTemplate.Triggers> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Culture" SortBy="Culture" FilterBy="Culture"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:StringHandleTemplate HandlePropertyName="CultureStringHandle" ValuePropertyName="Culture" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="AssemblyRefView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Flags" SortBy="Flags" FilterBy="Flags"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:EnumTemplate ValuePropertyName="Flags" TooltipPropertyName="FlagsTooltip"/> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="PublicKeyOrToken" SortBy="PublicKeyOrToken" FilterBy="PublicKeyOrToken"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="PublicKeyOrToken" TooltipPropertyName="PublicKeyOrTokenTooltip" ValueStringFormat="X" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Version" SortBy="Version" FilterBy="Version"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<Grid> |
|
||||||
<TextBlock Margin="3,1,0,0" x:Name="textBlock" Text="{Binding Version}" /> |
|
||||||
<TextBox x:Name="textBox" Text="{Binding Version, Mode=OneWay}" Visibility="Hidden" IsReadOnly="True" IsReadOnlyCaretVisible="True" /> |
|
||||||
</Grid> |
|
||||||
<DataTemplate.Triggers> |
|
||||||
<Trigger Property="IsMouseOver" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
<Trigger Property="IsKeyboardFocusWithin" Value="True"> |
|
||||||
<Setter TargetName="textBox" Property="Visibility" Value="Visible" /> |
|
||||||
<Setter TargetName="textBlock" Property="Visibility" Value="Hidden" /> |
|
||||||
</Trigger> |
|
||||||
</DataTemplate.Triggers> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Culture" SortBy="Culture" FilterBy="Culture"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:StringHandleTemplate HandlePropertyName="CultureStringHandle" ValuePropertyName="Culture" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="ExportedTypesView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Attributes" SortBy="Attributes" FilterBy="Attributes" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Attributes, StringFormat=X8}" ToolTip="{Binding AttributesTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="TypeDefId" SortBy="TypeDefId" FilterBy="TypeDefId"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding TypeDefId, StringFormat=X}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="TypeName" SortBy="TypeName" FilterBy="TypeName"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:StringHandleTemplate HandlePropertyName="TypeNamespaceStringHandle" ValuePropertyName="TypeName"/> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="TypeNamespace" SortBy="TypeNamespace" FilterBy="TypeNamespace"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:StringHandleTemplate HandlePropertyName="TypeNamespaceStringHandle" ValuePropertyName="TypeNamespace"/> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Implementation" SortBy="Implementation" FilterBy="Implementation"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Implementation, StringFormat=X8}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="MethodSpecsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Method" SortBy="MethodHandle" FilterBy="MethodHandle" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="MethodHandle" TooltipPropertyName="Method" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Signature" SortBy="Signature" FilterBy="Signature" CellTemplateSelector="{StaticResource SignatureBlobHandleDataTemplate}"/> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="MemberRefsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Parent" SortBy="ParentHandle" FilterBy="ParentHandle" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="ParentHandle" TooltipPropertyName="ParentTooltip" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Signature" SortBy="Signature" FilterBy="Signature" CellTemplateSelector="{StaticResource SignatureBlobHandleDataTemplate}"/> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="CustomAttributesView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Parent" SortBy="ParentHandle" FilterBy="ParentHandle" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="ParentHandle" TooltipPropertyName="ParentTooltip" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Constructor" SortBy="ConstructorHandle" FilterBy="ConstructorHandle" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="ConstructorHandle" TooltipPropertyName="ConstructorTooltip" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Value" SortBy="ValueHandle" FilterBy="ValueHandle"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="ValueHandle" TooltipPropertyName="ValueTooltip" ValueStringFormat="X" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="DeclSecurityAttrsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Parent" SortBy="ParentHandle" FilterBy="ParentHandle" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="ParentHandle" TooltipPropertyName="ParentTooltip" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Action" SortBy="Action" FilterBy="Action" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Action, StringFormat=X8}" ToolTip="{Binding ActionTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="PermissionSet" SortBy="PermissionSetHandle" FilterBy="PermissionSetHandle"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="PermissionSetHandle" TooltipPropertyName="PermissionSetTooltip" ValueStringFormat="X" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="MethodSemanticsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Semantics" SortBy="Semantics" FilterBy="Semantics" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Semantics, StringFormat=X8}" ToolTip="{Binding SemanticsTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Method" SortBy="MethodHandle" FilterBy="MethodHandle" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="MethodHandle" TooltipPropertyName="Method" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Association" SortBy="AssociationHandle" FilterBy="AssociationHandle" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="AssociationHandle" TooltipPropertyName="Association" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="ManifestResourcesView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Attributes" SortBy="Attributes" FilterBy="Attributes"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Attributes, StringFormat=X8}" ToolTip="{Binding AttributesTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Implementation" SortBy="ImplementationHandle" FilterBy="ImplementationHandle" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="ImplementationHandle" TooltipPropertyName="ImplementationTooltip" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="FilesView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Attributes" SortBy="Attributes" FilterBy="Attributes"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Attributes, StringFormat=X8}" ToolTip="{Binding AttributesTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="HashValue" SortBy="HashValue" FilterBy="HashValue"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="HashValue" TooltipPropertyName="HashValueTooltip" ValueStringFormat="X" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="StandAloneSigsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Signature" SortBy="Signature" FilterBy="Signature" CellTemplateSelector="{StaticResource SignatureBlobHandleDataTemplate}"/> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="ConstantsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Type" SortBy="Type" FilterBy="Type"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Type, StringFormat=X8}" ToolTip="{Binding TypeTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Parent" SortBy="ParentHandle" FilterBy="ParentHandle" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="ParentHandle" TooltipPropertyName="ParentTooltip" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Value" SortBy="Value" FilterBy="Value" CellTemplateSelector="{StaticResource ValueBlobHandleDataTemplate}"/> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="ParamsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Sequence" SortBy="Sequence" FilterBy="Sequence"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Sequence}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Attributes" SortBy="Attributes" FilterBy="Attributes"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Attributes, StringFormat=X8}" ToolTip="{Binding AttributesTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="GenericParamsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Number" SortBy="Number" FilterBy="Number"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Number}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Attributes" SortBy="Attributes" FilterBy="Attributes"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
<DataTemplate> |
|
||||||
<TextBlock Text="{Binding Attributes, StringFormat=X8}" ToolTip="{Binding AttributesTooltip}" /> |
|
||||||
</DataTemplate> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplate> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Owner" SortBy="OwnerHandle" FilterBy="OwnerHandle" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="OwnerHandle" TooltipPropertyName="Owner" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Name" SortBy="Name" FilterBy="Name" CellTemplateSelector="{StaticResource NameStringHandleDataTemplate}"/> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="GenericParamConstraintsView" AllowsColumnReorder="False"> |
|
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Owner" SortBy="OwnerHandle" FilterBy="OwnerHandle" FilterFormatString="X8"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="OwnerHandle" TooltipPropertyName="Owner" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="Type" SortBy="Type" FilterBy="Type"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="Type" TooltipPropertyName="TypeTooltip" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
|
|
||||||
<GridView x:Key="MethodImplView" AllowsColumnReorder="False"> |
<local:ByteWidthConverter x:Key="byteWidthConverter" /> |
||||||
<controls:FilterableGridViewColumn Header="RID" SortBy="RID" FilterBy="RID" CellTemplate="{StaticResource RowIDDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Token" SortBy="Token" FilterBy="Token" FilterFormatString="X8" CellTemplateSelector="{StaticResource DefinitionHandleDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Offset" SortBy="Offset" FilterBy="Offset" FilterFormatString="X8" CellTemplate="{StaticResource OffsetDataTemplate}"/> |
|
||||||
<controls:FilterableGridViewColumn Header="Type" SortBy="TypeHandle" FilterBy="TypeHandle"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="TypeHandle" TooltipPropertyName="Type" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="MethodBody" SortBy="MethodBodyHandle" FilterBy="MethodBodyHandle"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="MethodBodyHandle" TooltipPropertyName="MethodBody" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
<controls:FilterableGridViewColumn Header="MethodDeclaration" SortBy="MethodDeclarationHandle" FilterBy="MethodDeclarationHandle"> |
|
||||||
<controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
<local:HandleTemplate ValuePropertyName="MethodDeclarationHandle" TooltipPropertyName="MethodDeclaration" /> |
|
||||||
</controls:FilterableGridViewColumn.CellTemplateSelector> |
|
||||||
</controls:FilterableGridViewColumn> |
|
||||||
</GridView> |
|
||||||
</ResourceDictionary> |
</ResourceDictionary> |
||||||
|
|||||||
@ -1,93 +0,0 @@ |
|||||||
// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
|
||||||
// software and associated documentation files (the "Software"), to deal in the Software
|
|
||||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
|
||||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
|
||||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all copies or
|
|
||||||
// substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
||||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
||||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
||||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
||||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
// DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
using System; |
|
||||||
using System.Globalization; |
|
||||||
using System.Windows; |
|
||||||
using System.Windows.Controls; |
|
||||||
using System.Windows.Data; |
|
||||||
|
|
||||||
namespace ICSharpCode.ILSpy.Metadata |
|
||||||
{ |
|
||||||
public class StringHandleTemplate : DataTemplateSelector |
|
||||||
{ |
|
||||||
public string ValuePropertyName { get; set; } |
|
||||||
public string HandlePropertyName { get; set; } |
|
||||||
|
|
||||||
private DataTemplate template; |
|
||||||
|
|
||||||
public override DataTemplate SelectTemplate(object item, DependencyObject container) |
|
||||||
{ |
|
||||||
if (template != null) |
|
||||||
return template; |
|
||||||
var textBlock = new FrameworkElementFactory(typeof(TextBlock), "textBlock"); |
|
||||||
textBlock.SetValue(FrameworkElement.MarginProperty, new Thickness(3, 1, 0, 0)); |
|
||||||
textBlock.SetBinding(TextBlock.TextProperty, new Binding(ValuePropertyName) { StringFormat = "\"{0}\"" }); |
|
||||||
var textBox = new FrameworkElementFactory(typeof(TextBox), "textBox"); |
|
||||||
textBox.SetBinding(TextBox.TextProperty, new Binding(ValuePropertyName) { StringFormat = "\"{0}\"", Mode = BindingMode.OneWay }); |
|
||||||
textBox.SetValue(TextBox.VisibilityProperty, Visibility.Hidden); |
|
||||||
textBox.SetValue(TextBox.IsReadOnlyCaretVisibleProperty, true); |
|
||||||
textBox.SetValue(TextBox.IsReadOnlyProperty, true); |
|
||||||
textBox.SetBinding(FrameworkElement.ToolTipProperty, new MultiBinding { |
|
||||||
Converter = new StringHandleConverter(), |
|
||||||
Bindings = { |
|
||||||
new Binding(HandlePropertyName), |
|
||||||
new Binding(ValuePropertyName) |
|
||||||
} |
|
||||||
}); |
|
||||||
var grid = new FrameworkElementFactory(typeof(Grid)); |
|
||||||
grid.AppendChild(textBlock); |
|
||||||
grid.AppendChild(textBox); |
|
||||||
template = new DataTemplate { |
|
||||||
VisualTree = grid, |
|
||||||
Triggers = { |
|
||||||
new Trigger { |
|
||||||
Property = UIElement.IsMouseOverProperty, |
|
||||||
Value = true, |
|
||||||
Setters = { |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Visible, "textBox"), |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Hidden, "textBlock"), |
|
||||||
} |
|
||||||
}, |
|
||||||
new Trigger { |
|
||||||
Property = UIElement.IsKeyboardFocusWithinProperty, |
|
||||||
Value = true, |
|
||||||
Setters = { |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Visible, "textBox"), |
|
||||||
new Setter(UIElement.VisibilityProperty, Visibility.Hidden, "textBlock"), |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
}; |
|
||||||
return template; |
|
||||||
} |
|
||||||
|
|
||||||
private class StringHandleConverter : IMultiValueConverter |
|
||||||
{ |
|
||||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) |
|
||||||
{ |
|
||||||
return string.Format("{0:X} \"{1}\"", values[0], values[1]); |
|
||||||
} |
|
||||||
|
|
||||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) |
|
||||||
{ |
|
||||||
throw new NotImplementedException(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
Loading…
Reference in new issue