Browse Source

Started to work on a Formated Text Editor for TextBlock!

pull/584/head
jkuehner 11 years ago
parent
commit
5e3e8c3432
  1. 49
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs
  2. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/InPlaceEditorExtension.cs
  3. 7
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/RightClickContextMenuExtension.cs
  4. 37
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SnaplinePlacementBehavior.cs
  5. 7
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/TextBlockRightClickContextMenu.xaml
  6. 62
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/TextBlockRightClickContextMenu.xaml.cs
  7. 36
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/TextBlockRightClickContextMenuExtension.cs
  8. 20
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FormatedTextEditor/FormatedTextEditor.xaml
  9. 136
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FormatedTextEditor/FormatedTextEditor.xaml.cs
  10. 18
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj
  11. 6
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/CollectionSupport.cs
  12. 1
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs

49
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs

@ -17,11 +17,15 @@ @@ -17,11 +17,15 @@
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Threading;
@ -443,5 +447,48 @@ namespace ICSharpCode.WpfDesign.Designer @@ -443,5 +447,48 @@ namespace ICSharpCode.WpfDesign.Designer
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
}
}
#region ContextMenu
private Dictionary<ContextMenu, List<object>> contextMenusAndEntries = new Dictionary<ContextMenu, List<object>>();
public void AddContextMenu(ContextMenu contextMenu)
{
contextMenusAndEntries.Add(contextMenu, new List<object>(contextMenu.Items.Cast<object>()));
contextMenu.Items.Clear();
UpdateContextMenu();
}
public void RemoveContextMenu(ContextMenu contextMenu)
{
contextMenusAndEntries.Remove(contextMenu);
UpdateContextMenu();
}
private void UpdateContextMenu()
{
if (contextMenusAndEntries.Count == 0)
this.ContextMenu = null;
if (this.ContextMenu == null)
this.ContextMenu = new ContextMenu();
this.ContextMenu.Items.Clear();
foreach (var entries in contextMenusAndEntries.Values)
{
if (this.ContextMenu.Items.Count > 0)
this.ContextMenu.Items.Add(new Separator());
foreach (var entry in entries)
{
ContextMenu.Items.Add(entry);
}
}
}
#endregion
}
}

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/InPlaceEditorExtension.cs

@ -34,7 +34,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -34,7 +34,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
/// <summary>
/// Extends In-Place editor to edit any text in the designer which is wrapped in the Visual tree under TexBlock
/// </summary>
[ExtensionFor(typeof(FrameworkElement))]
//[ExtensionFor(typeof(FrameworkElement))]
public class InPlaceEditorExtension : PrimarySelectionAdornerProvider
{
AdornerPanel adornerPanel;

7
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/RightClickContextMenuExtension.cs

@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;
@ -35,18 +36,20 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -35,18 +36,20 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
public sealed class RightClickContextMenuExtension : PrimarySelectionAdornerProvider
{
DesignPanel panel;
ContextMenu contextMenu;
protected override void OnInitialized()
{
base.OnInitialized();
contextMenu = new RightClickContextMenu(ExtendedItem);
panel = ExtendedItem.Context.Services.DesignPanel as DesignPanel;
panel.ContextMenu = new RightClickContextMenu(ExtendedItem);
panel.AddContextMenu(contextMenu);
}
protected override void OnRemove()
{
panel.ContextMenu = null;
panel.RemoveContextMenu(contextMenu);
base.OnRemove();
}

37
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SnaplinePlacementBehavior.cs

@ -235,23 +235,26 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -235,23 +235,26 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
void AddLines(Rect r, double inflate, bool requireOverlap, List<Snapline> h, List<Snapline> v, PlacementAlignment? filter)
{
Rect r2 = r;
r2.Inflate(inflate, inflate);
if (filter == null || filter.Value.Vertical == VerticalAlignment.Top)
h.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Top - 1, Start = r.Left, End = r.Right });
if (filter == null || filter.Value.Vertical == VerticalAlignment.Bottom)
h.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Bottom - 1, Start = r.Left, End = r.Right });
if (filter == null || filter.Value.Horizontal == HorizontalAlignment.Left)
v.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Left - 1, Start = r.Top, End = r.Bottom });
if (filter == null || filter.Value.Horizontal == HorizontalAlignment.Right)
v.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Right - 1, Start = r.Top, End = r.Bottom });
if (filter == null)
{
h.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Top + Math.Abs((r2.Top - r2.Bottom) / 2), Start = r.Left, End = r.Right });
v.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Left + Math.Abs((r2.Left - r2.Right) / 2), Start = r.Top, End = r.Bottom });
}
if (r != Rect.Empty)
{
Rect r2 = r;
r2.Inflate(inflate, inflate);
if (filter == null || filter.Value.Vertical == VerticalAlignment.Top)
h.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Top - 1, Start = r.Left, End = r.Right });
if (filter == null || filter.Value.Vertical == VerticalAlignment.Bottom)
h.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Bottom - 1, Start = r.Left, End = r.Right });
if (filter == null || filter.Value.Horizontal == HorizontalAlignment.Left)
v.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Left - 1, Start = r.Top, End = r.Bottom });
if (filter == null || filter.Value.Horizontal == HorizontalAlignment.Right)
v.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Right - 1, Start = r.Top, End = r.Bottom });
if (filter == null)
{
h.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Top + Math.Abs((r2.Top - r2.Bottom) / 2), Start = r.Left, End = r.Right });
v.Add(new Snapline() { RequireOverlap = requireOverlap, Offset = r2.Left + Math.Abs((r2.Left - r2.Right) / 2), Start = r.Top, End = r.Bottom });
}
}
}
void AddBaseline(DesignItem item, Rect bounds, List<Snapline> list)

7
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/TextBlockRightClickContextMenu.xaml

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
<ContextMenu x:Class="ICSharpCode.WpfDesign.Designer.Extensions.TextBlockRightClickContextMenu"
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Translation="clr-namespace:ICSharpCode.WpfDesign.Designer"
>
<MenuItem Header="EditFormatedText" Click="Click_EditFormatedText" />
</ContextMenu>

62
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/TextBlockRightClickContextMenu.xaml.cs

@ -0,0 +1,62 @@ @@ -0,0 +1,62 @@
// Copyright (c) 2014 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.Collections.Generic;
using System.Linq;
using System.Text;
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 ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.FormatedTextEditor;
using ICSharpCode.WpfDesign.PropertyGrid;
namespace ICSharpCode.WpfDesign.Designer.Extensions
{
public partial class TextBlockRightClickContextMenu
{
private DesignItem designItem;
public TextBlockRightClickContextMenu(DesignItem designItem)
{
this.designItem = designItem;
InitializeComponent();
}
void Click_EditFormatedText(object sender, RoutedEventArgs e)
{
var dlg = new Window()
{
Content = new FormatedTextEditor(designItem),
Width = 400,
Height = 200,
WindowStyle = WindowStyle.ToolWindow,
Owner = ((DesignPanel) designItem.Context.Services.DesignPanel).TryFindParent<Window>(),
};
dlg.ShowDialog();
}
}
}

36
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/TextBlockRightClickContextMenuExtension.cs

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using ICSharpCode.WpfDesign.Adorners;
using ICSharpCode.WpfDesign.Extensions;
namespace ICSharpCode.WpfDesign.Designer.Extensions
{
[ExtensionServer(typeof (OnlyOneItemSelectedExtensionServer))]
[ExtensionFor(typeof (TextBlock))]
public class TextBlockRightClickContextMenuExtension : PrimarySelectionAdornerProvider
{
DesignPanel panel;
ContextMenu contextMenu;
protected override void OnInitialized()
{
base.OnInitialized();
contextMenu = new TextBlockRightClickContextMenu(ExtendedItem);
panel = ExtendedItem.Context.Services.DesignPanel as DesignPanel;
panel.AddContextMenu(contextMenu);
}
protected override void OnRemove()
{
panel.RemoveContextMenu(contextMenu);
base.OnRemove();
}
}
}

20
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FormatedTextEditor/FormatedTextEditor.xaml

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
<UserControl x:Class="ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.FormatedTextEditor.FormatedTextEditor"
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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d" d:DesignWidth="410" d:DesignHeight="259" >
<Grid>
<xctk:RichTextBox Margin="10,76,10,10" x:Name="richTextBox">
<xctk:RichTextBoxFormatBarManager.FormatBar>
<xctk:RichTextBoxFormatBar />
</xctk:RichTextBoxFormatBarManager.FormatBar>
</xctk:RichTextBox>
<!--<xctk:RichTextBoxFormatBar Target="{Binding ElementName=richTextBox}" Margin="10,10,105,188" />-->
<Button Content="Ok" Margin="0,10,10,0" HorizontalAlignment="Right" Width="90" Height="28" VerticalAlignment="Top" Click="Ok_Click" />
<Button Content="Cancel" Margin="0,43,10,0" HorizontalAlignment="Right" Width="90" Height="28" VerticalAlignment="Top" Click="Cancel_Click" />
</Grid>
</UserControl>

136
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FormatedTextEditor/FormatedTextEditor.xaml.cs

@ -0,0 +1,136 @@ @@ -0,0 +1,136 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security;
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 System.Xml;
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.FormatedTextEditor
{
/// <summary>
/// Interaktionslogik für FormatedTextEditor.xaml
/// </summary>
public partial class FormatedTextEditor
{
private DesignItem designItem;
public FormatedTextEditor(DesignItem designItem)
{
InitializeComponent();
this.designItem = designItem;
}
private void GetDesignItems(TextElementCollection<Block> blocks, List<DesignItem> list)
{
bool first = true;
foreach (var block in blocks)
{
if (block is Paragraph)
{
if (!first)
{
list.Add(designItem.Services.Component.RegisterComponentForDesigner(new LineBreak()));
list.Add(designItem.Services.Component.RegisterComponentForDesigner(new LineBreak()));
}
foreach (var inline in ((Paragraph) block).Inlines)
{
//yield return inline;
list.Add(CloneInline(inline));
}
}
else if (block is Section)
{
GetDesignItems(((Section)block).Blocks, list);
}
first = false;
}
}
private DesignItem CloneInline(Inline inline)
{
DesignItem d = d = designItem.Services.Component.RegisterComponentForDesigner(inline);
if (inline is Run)
{
var run = inline as Run;
if (run.ReadLocalValue(Run.TextProperty) != DependencyProperty.UnsetValue)
{
d.Properties.GetProperty(Run.TextProperty).SetValue(run.Text);
}
}
else if (inline is Span)
{ }
else if (inline is LineBreak)
{ }
else
{
return null;
}
if (inline.ReadLocalValue(TextElement.BackgroundProperty) != DependencyProperty.UnsetValue)
d.Properties.GetProperty(TextElement.BackgroundProperty).SetValue(inline.Background);
if (inline.ReadLocalValue(TextElement.ForegroundProperty) != DependencyProperty.UnsetValue)
d.Properties.GetProperty(TextElement.ForegroundProperty).SetValue(inline.Foreground);
if (inline.ReadLocalValue(TextElement.FontFamilyProperty) != DependencyProperty.UnsetValue)
d.Properties.GetProperty(TextElement.FontFamilyProperty).SetValue(inline.FontFamily);
if (inline.ReadLocalValue(TextElement.FontSizeProperty) != DependencyProperty.UnsetValue)
d.Properties.GetProperty(TextElement.FontSizeProperty).SetValue(inline.FontSize);
if (inline.ReadLocalValue(TextElement.FontStretchProperty) != DependencyProperty.UnsetValue)
d.Properties.GetProperty(TextElement.FontStretchProperty).SetValue(inline.FontStretch);
if (inline.ReadLocalValue(TextElement.FontStyleProperty) != DependencyProperty.UnsetValue)
d.Properties.GetProperty(TextElement.FontStyleProperty).SetValue(inline.FontStyle);
if (inline.ReadLocalValue(TextElement.FontWeightProperty) != DependencyProperty.UnsetValue)
d.Properties.GetProperty(TextElement.FontWeightProperty).SetValue(inline.FontWeight);
if (inline.ReadLocalValue(TextElement.TextEffectsProperty) != DependencyProperty.UnsetValue)
d.Properties.GetProperty(TextElement.TextEffectsProperty).SetValue(inline.TextEffects);
return d;
}
private void Ok_Click(object sender, RoutedEventArgs e)
{
var changeGroup = designItem.OpenGroup("Formated Text");
designItem.Properties.GetProperty(TextBlock.TextProperty).Reset();
var inlinesProperty = designItem.Properties.GetProperty("Inlines");
inlinesProperty.CollectionElements.Clear();
var doc = richTextBox.Document;
richTextBox.Document = new FlowDocument();
var inlines = new List<DesignItem>();
GetDesignItems(doc.Blocks, inlines);
foreach (var inline in inlines)
{
inlinesProperty.CollectionElements.Add(inline);
}
changeGroup.Commit();
this.TryFindParent<Window>().Close();
}
private void Cancel_Click(object sender, RoutedEventArgs e)
{
this.TryFindParent<Window>().Close();
}
}
}

18
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj

@ -85,12 +85,16 @@ @@ -85,12 +85,16 @@
</Compile>
<Compile Include="Controls\RenderTransformOriginThumb.cs" />
<Compile Include="Extensions\PartialPanelSelectionHandler.cs" />
<Compile Include="Extensions\TextBlockRightClickContextMenu.xaml.cs">
<DependentUpon>TextBlockRightClickContextMenu.xaml</DependentUpon>
</Compile>
<Compile Include="Extensions\RightClickContextMenu.xaml.cs">
<DependentUpon>RightClickContextMenu.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Extensions\RenderTransformOriginExtension.cs" />
<Compile Include="Extensions\RightClickContextMenuExtension.cs" />
<Compile Include="Extensions\TextBlockRightClickContextMenuExtension.cs" />
<Compile Include="OutlineView\OutlineNodeBase.cs" />
<Compile Include="Extensions\RightClickMultipleItemsContextMenuExtension.cs" />
<Compile Include="Extensions\RightClickMultipleItemsContextMenu.xaml.cs">
@ -105,6 +109,9 @@ @@ -105,6 +109,9 @@
<DependentUpon>FlatCollectionEditor.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="PropertyGrid\Editors\FormatedTextEditor\FormatedTextEditor.xaml.cs">
<DependentUpon>FormatedTextEditor.xaml</DependentUpon>
</Compile>
<Compile Include="PropertyGrid\Editors\OpenCollectionEditor.xaml.cs">
<DependentUpon>OpenCollectionEditor.xaml</DependentUpon>
</Compile>
@ -268,10 +275,17 @@ @@ -268,10 +275,17 @@
<Resource Include="Images\Tag.png" />
</ItemGroup>
<ItemGroup>
<Page Include="Extensions\TextBlockRightClickContextMenu.xaml">
<SubType>Designer</SubType>
</Page>
<Page Include="Extensions\RightClickContextMenu.xaml" />
<Page Include="Extensions\RightClickMultipleItemsContextMenu.xaml" />
<Page Include="PropertyGrid\Editors\ColorEditor.xaml" />
<Page Include="PropertyGrid\Editors\FlatCollectionEditor.xaml" />
<Page Include="PropertyGrid\Editors\FormatedTextEditor\FormatedTextEditor.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PropertyGrid\Editors\OpenCollectionEditor.xaml" />
<Page Include="PropertyGrid\Editors\TimeSpanEditor.xaml" />
<Page Include="ThumbnailView\ThumbnailView.xaml" />
@ -379,9 +393,7 @@ @@ -379,9 +393,7 @@
<ItemGroup>
<Resource Include="Images\group2.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="ThumbnailView" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Resource Include="Images\Icons.16x16.Properties.Events.png" />
<Resource Include="Images\Icons.16x16.WpfOutline.Eye.png" />

6
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/CollectionSupport.cs

@ -23,6 +23,7 @@ using System.ComponentModel; @@ -23,6 +23,7 @@ using System.ComponentModel;
using System.Globalization;
using System.Reflection;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Markup;
namespace ICSharpCode.WpfDesign.XamlDom
@ -37,10 +38,11 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -37,10 +38,11 @@ namespace ICSharpCode.WpfDesign.XamlDom
/// </summary>
public static bool IsCollectionType(Type type)
{
return typeof(IList).IsAssignableFrom(type)
return type != typeof(LineBreak) && (
typeof(IList).IsAssignableFrom(type)
|| type.IsArray
|| typeof(IAddChild).IsAssignableFrom(type)
|| typeof(IDictionary).IsAssignableFrom(type);
|| typeof(IDictionary).IsAssignableFrom(type));
}
/// <summary>

1
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs

@ -102,6 +102,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid @@ -102,6 +102,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid
}
else
{
var l=TypeDescriptor.GetProperties(element);
foreach(PropertyDescriptor p in TypeDescriptor.GetProperties(element)){
if (!p.IsBrowsable) continue;
if (p.IsReadOnly && !typeof(ICollection).IsAssignableFrom(p.PropertyType)) continue;

Loading…
Cancel
Save