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

22nd
Sep 2016
Johan Larsson
@JohanLarsson
Sep 22 2016 06:04 UTC
yes
Arasn
@Arasn
Sep 22 2016 11:00 UTC
Thanks, I think that not work with MomentumRow and ForceRow, I got an exception.
Johan Larsson
@JohanLarsson
Sep 22 2016 11:00 UTC
What is the exception?
Arasn
@Arasn
Sep 22 2016 11:02 UTC
System.Windows.Markup.XamlParseException occurred
HResult=-2146233087
LineNumber=65
LinePosition=14

this is line 65:

<Style BasedOn="{StaticResource {x:Type propertyGrid:ForceRow}}" TargetType="{x:Type propertyGrid:ForceRow}">

Johan Larsson
@JohanLarsson
Sep 22 2016 11:03 UTC
is there an inner exception?
Also are you using the nuget or the lib?
I renamed all things in the lib, should have made a branch for it
Arasn
@Arasn
Sep 22 2016 11:04 UTC
Gu.Wpf.PropertyGrid\Controls\Rows\BaseClasses\Row.cs:Zeile 40
InnerException:
HResult=-2146233088
Message=Die Ressource mit dem Namen "Gu.Wpf.PropertyGrid.UnitRows.ForceRow" kann nicht gefunden werden. Bei Ressourcennamen wird die Groß- und Kleinschreibung berücksichtigt.
Source=PresentationFramework
StackTrace:
bei System.Windows.StaticResourceExtension.ProvideValueInternal(IServiceProvider serviceProvider, Boolean allowDeferredReference)
bei System.Windows.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider)
bei MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)
Johan Larsson
@JohanLarsson
Sep 22 2016 11:04 UTC
Giot interrupted and left it in a very messy state
Johan Larsson
@JohanLarsson
Sep 22 2016 11:05 UTC
ok that is a pretty good exception, it can't find Gu.Wpf.PropertyGrid.UnitRows.ForceRow
Arasn
@Arasn
Sep 22 2016 11:06 UTC
I am using Lib. did you prefer to use Nuget?
Johan Larsson
@JohanLarsson
Sep 22 2016 11:06 UTC
probably better to use the source as it will be the new nuget
Less breaking changes later then
I'm sorry about this mess
Arasn
@Arasn
Sep 22 2016 11:07 UTC
ForceRow is exist in the lib and I already use it in my code.
Johan Larsson
@JohanLarsson
Sep 22 2016 11:08 UTC
what is propertyGridmapped to?
The exception says it can't find it (at least I thinks so dunno much German)
Arasn
@Arasn
Sep 22 2016 11:08 UTC
no at all, I am proud to use this fantastic solution.
The Thing is, I am doing a Loop for each property in my class and depending on its type I create a xxRow element.
one of the property has Force type and should get a ForceRow() it already works, but the PlainTemplate is wished, that currently give Exception in For as well Momentum.
Arasn
@Arasn
Sep 22 2016 11:16 UTC
All that I am doing is this function:
http://prntscr.com/ckzneh
May be there is an easier way with your solution to reach that. You used PropertySettings (Gu.State) that is pretty compact.
Johan Larsson
@JohanLarsson
Sep 22 2016 11:28 UTC
about the loop: no way to bind it to an observablecollection?
Arasn
@Arasn
Sep 22 2016 11:31 UTC
how?
btw. I must compile with .Net 4.0
Johan Larsson
@JohanLarsson
Sep 22 2016 11:37 UTC
yeah, not sure .net 4 will work
Arasn
@Arasn
Sep 22 2016 11:37 UTC
hmmm
Johan Larsson
@JohanLarsson
Sep 22 2016 11:37 UTC
I probably use [CallerMemberName] somewhere
Arasn
@Arasn
Sep 22 2016 11:38 UTC
yes I removed that.
Johan Larsson
@JohanLarsson
Sep 22 2016 11:42 UTC
but not in the nuget
Arasn
@Arasn
Sep 22 2016 11:44 UTC
unfortunately yes. I must download all Libs now :(
but you used also System.Collections.Generic.IReadOnlyList that Comes with 4.5 too. Oh
Johan Larsson
@JohanLarsson
Sep 22 2016 11:48 UTC
hmm, thought it was 4.0 but I never remember
why do you have 4.0 requirement? It is an old version of the framework
Arasn
@Arasn
Sep 22 2016 11:54 UTC
Yes it is old, but our existing Form-Application developed on it, and we are before new release can not migrate to 4.5, your WPF-UserControl would also Comes to our Forms other challange to me to fix the Layout issues
Johan Larsson
@JohanLarsson
Sep 22 2016 11:54 UTC
ok
Arasn
@Arasn
Sep 22 2016 11:55 UTC
Gu.Unit does not build any more with 4.0
Johan Larsson
@JohanLarsson
Sep 22 2016 11:55 UTC
pain
Arasn
@Arasn
Sep 22 2016 12:08 UTC
Yes, very painfull, after all Investigation with this PropertyGrid. Looking for solution
Arasn
@Arasn
Sep 22 2016 12:37 UTC
Is it possible to down-grade to 4.0 I give a try now, which Lib has least dependencies?
Johan Larsson
@JohanLarsson
Sep 22 2016 12:39 UTC
Should be possible but some work
Gu.Units does not have any dependencies that I can think of.
Gu.PropertyGrid has dependencies on Gu.NumericInput & Gu.Units and Gu.ValidationScope
It will be some work and then some work to maintain in a fork.
Arasn
@Arasn
Sep 22 2016 12:43 UTC
best replacement of IReadOnlyList is List?
Johan Larsson
@JohanLarsson
Sep 22 2016 12:44 UTC
Probably IEnumerable<T> most of the time
Will not have indexing and you will have to use Count() instead of Count
Arasn
@Arasn
Sep 22 2016 14:02 UTC
I finished downgrade for Gu.Unit till now. But not sure if this works at all.
Johan Larsson
@JohanLarsson
Sep 22 2016 14:04 UTC
you can run the tests and be reasonably sure
Decent test suite