These are chat archives for JohanLarsson/Gu.Wpf.PropertyGrid

21st
Sep 2016
Arasn
@Arasn
Sep 21 2016 22:38
Hello. I have a question regarding the Demo Project in PropertyGrid. Can I use a Template for Structures?
concerning SettingVM.cs to make:
public class StructChangedSettings<T> : INotifyPropertyChanged
Johan Larsson
@JohanLarsson
Sep 21 2016 22:39
not sure how you mean
Arasn
@Arasn
Sep 21 2016 22:43
the SettingVM wrote for DummySetting structure, which you do BindingContext in WPF. I have many structures about 30, so I defined my SettingVM as <T> template to be used for all structures that I have. My Problem is I can't do Binding to get Save and Undo working.
Johan Larsson
@JohanLarsson
Sep 21 2016 22:50
can you constrain T to an interface?
or use a base class?
Arasn
@Arasn
Sep 21 2016 22:53
no, the structures has no base. But I can try with Interface if it is works?.
Arasn
@Arasn
Sep 21 2016 23:20
about Plain view, is it style dependant?
http://prntscr.com/cktzml
I Need to have same view, to save place and not showing the "Old Value .." by changes, how to perform that?
Johan Larsson
@JohanLarsson
Sep 21 2016 23:24
by retemplating the rows
something like ^
Arasn
@Arasn
Sep 21 2016 23:48
that means for LengthRow, ForceRow that I have also Need to put style like this:
        <Style BasedOn="{StaticResource {x:Type propertyGrid:LengthRow}}" TargetType="{x:Type propertyGrid:LengthRow}">
            <Setter Property="Template" Value="{StaticResource LengthRowPlainTemplate}" />
        </Style>