Note that there are some explanatory texts on larger screens.

plurals
  1. POCatel MVVM xctk:PropertyGrid = Error
    text
    copied!<p>I have an error when I use Catel Framework together with Xceed.Wpf.Toolkit.PropertyGrid. The error consists in the fact that the PropertyGrid is invisible custom attributes if I inherit from ViewModelBase If I inherit from ModelBase that all is normal</p> <p>This code work wery well</p> <pre><code> public class PersonViewModel : ModelBase { [DisplayName(@"Название")] [Description(@"Название стратегии")] [Category(@"Основные")] [PropertyOrder(0)] public string Person { get { return GetValue&lt;string&gt;(PersonProperty); } set { SetValue(PersonProperty, value); } } public static readonly PropertyData PersonProperty = RegisterProperty("Person", typeof(string)); } </code></pre> <p>but this code didn't work</p> <pre><code> public class PersonViewModel : ViewModelBase { [DisplayName(@"Название")] [Description(@"Название стратегии")] [Category(@"Основные")] [PropertyOrder(0)] public string Person { get { return GetValue&lt;string&gt;(PersonProperty); } set { SetValue(PersonProperty, value); } } public static readonly PropertyData PersonProperty = RegisterProperty("Person", typeof(string)); } </code></pre> <p>XAML</p> <pre><code> &lt;xcad:LayoutAnchorable ContentId="alarms" Title="Alarms" &gt; &lt;xctk:PropertyGrid BorderThickness="0" SelectedObject="{Binding Path=SelectedObject}" ShowSearchBox="False" ShowSortOptions="False" Width="Auto" AutoGenerateProperties="False" NameColumnWidth="150"&gt; &lt;xctk:PropertyGrid.PropertyDefinitions&gt; &lt;xctk:PropertyDefinition Name="Person" /&gt; &lt;/xctk:PropertyGrid.PropertyDefinitions&gt; &lt;/xctk:PropertyGrid&gt; &lt;/xcad:LayoutAnchorable&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload