by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:16

    delete-merged-branch[bot] on nuget

    (compare)

  • 09:16
    GeertvanHorrik closed #1622
  • 09:03
    dependabot-preview[bot] labeled #1622
  • 09:02
    dependabot-preview[bot] opened #1622
  • 09:02

    dependabot-preview[bot] on nuget

    Bump Moq from 4.14.4 to 4.14.5 … (compare)

  • Jul 01 07:45

    GeertvanHorrik on develop

    Mark assembly extension tests a… #1606 KeyboardHelper.GetCurrent… #1605 Validation on view models… and 15 more (compare)

  • Jul 01 07:44

    GeertvanHorrik on master

    Mark assembly extension tests a… #1606 KeyboardHelper.GetCurrent… #1605 Validation on view models… and 13 more (compare)

  • Jul 01 07:44

    GeertvanHorrik on 5.12.7

    (compare)

  • Jul 01 07:42

    GeertvanHorrik on 5.12.7

    Update release date Build script maintenance (compare)

  • Jun 30 14:22
    GeertvanHorrik labeled #1621
  • Jun 30 14:22
    GeertvanHorrik labeled #1621
  • Jun 30 14:22
    GeertvanHorrik assigned #1621
  • Jun 30 14:22
    GeertvanHorrik milestoned #1621
  • Jun 30 14:22
    GeertvanHorrik opened #1621
  • Jun 30 08:44

    dependabot-preview[bot] on nuget

    (compare)

  • Jun 30 08:44

    dependabot-preview[bot] on develop

    Bump PublicApiGenerator from 10… Merge pull request #1620 from C… (compare)

  • Jun 30 08:44
    dependabot-preview[bot] closed #1620
  • Jun 30 08:43
    dependabot-preview[bot] opened #1620
  • Jun 30 08:43

    dependabot-preview[bot] on nuget

    Bump PublicApiGenerator from 10… (compare)

  • Jun 27 17:20

    delete-merged-branch[bot] on 20200627-171948

    (compare)

Geert van Horrik
@GeertvanHorrik
It totally depends on your implementation. We are available for app-specific consulting if you prefer
tm1k
@tm1k
Building the application solved the problem
tm1k
@tm1k
I just run into a situation like Michaek van den Berg on May 11. I have two models which I want to access in a ViewModel. If I understand correctly, one of them must be injected by its service. Is there an example how the update of a property of the model will be forwarded to the VM by the service? I think I need to implement this myself?
Geert van Horrik
@GeertvanHorrik
not sure what you mean, please give a good example
tm1k
@tm1k
I have two models, say Persons and Streets, which are separate (will also be serialized separately to have two files when saving it) but their contents will be used both in one ViewModel. Persons will be injected in the Viewmodel and fills a Listbox. Now I want to have the content of Streets available as well in that ViewModel where a Street can be chosen. But I am unable to Access the Street ObservableCollection which is located in the MainView from the Viewmodel. So I thought I could do this with a service?
tm1k
@tm1k
A direct access to the MainModel property would also do the job, but I can't get it right
Geert van Horrik
@GeertvanHorrik
in most situations, models will have relationship properties
tm1k
@tm1k
You mean, that Streets will be a property of the Persons property?
Geert van Horrik
@GeertvanHorrik
sorry, I misread. In this case, use a service to manage the street data
(or a repository, whatever you want to call it)
there should be a single service / repository responsible for managing streets
tm1k
@tm1k
Okay, is there an example I can work with in implementing such a service?
Geert van Horrik
@GeertvanHorrik
you can inject that and use it. It could support change notifications and you can update all your vm's at once
I think Orc.EntityFramework does offer something like this for db access. But we don't have many out of the box examples of this, most of that is closed source for us
tm1k
@tm1k
That already sounds like the thing I am looking for desperately
Geert van Horrik
@GeertvanHorrik
https://opensource.wildgums.com, you should check it out, lots of out of the box free stuff
tm1k
@tm1k
Okay, ill have a look on the Entity FW
tm1k
@tm1k
So when I understand correctly, I can use Orc.EntityFramework already for such a repository containing my Streets Model?
Geert van Horrik
@GeertvanHorrik
yeah, but it has a bit of learning curve AND is focused on EntityFramework
tm1k
@tm1k
okay, sounds promising. I'll have a look
tm1k
@tm1k
I found a neat example on github concerning the Entity Framework in Catel: https://github.com/KazysNoobiys/DemoCatel Now I have a good understanding how to manage it
Geert van Horrik
@GeertvanHorrik
perfect, thanks for letting us know
tm1k
@tm1k
Got the EntityFramework working now. But I am unable to find an example for the DbChangeTracker in a UnitOfWork and Repository pattern.
Is there something I can use to get notifications about changed items in the Repository?
Geert van Horrik
@GeertvanHorrik
I don't think it does this out of the box. You'll have to implement your own messaging (MessageMediator?) implementation
(so Catel has a MessageMEdiator, you "just" have to send messages around to the interesting parties that something has changed
tm1k
@tm1k
Sounds clever, I will have a look at it
culer
@culer
@GeertvanHorrik If I'm using TreeViews with a HierarchicalDataTemplate with Catel, what is the correct way to handle changes to "Expand" of each TreeViewItem preferrably in the ViewModel of the TreeViewItem? I tried "EventToCommand" Trigger but this doesn't work as it's bound to the TreeView as a whole not on TreeViewItem level. Then I tried using a Style Setter (<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />) but this binds to the Model behind the TreeViewItem directly instead of ViewModel. Any hints?
Geert van Horrik
@GeertvanHorrik
I would use a hierarchical model (thus not a view model per tree view item, but just 1 for the treeview). You could try to use x:Name and bind to TreeListView.DataContext (which is the VM) or using RelativeSource binding
culer
@culer
Thanks for the hint. I'm not sure if I completely understand what you're saying. Is your comment about binding to "TreeListView.DataContext" refering to EventToCommand Trigger or to the Property Setter I was describing? Could you maybe send a short code snippet of what exactly you mean?
Geert van Horrik
@GeertvanHorrik
No, I can't provide an example. I'm sorry, but I'm too busy to create free examples, done that too many times in the past. maybe ask the question on stack overflow?
culer
@culer
I'm not talking about an example, I just didn't understand what you meant by "try to use x:Name and bind to TreeListView.DataContext" and thought you could tell me in which context I need to read your answer to understand correctly. Can of course also try on StackOverflow - however most of the Catel questions that have real "solution" there where also answered by you ;)
tm1k
@tm1k
I just tried to implement a wizard according to the manual in https://opensource.wildgums.com/orc.wizard/ but there is a problem I can't resolve. I get the "System.MissingMethodException" which is missing "Void catel.Data.ModelBase.SetValue(Catel.Data.PropertyData, !!0, Boolean)". When I try to "LoadAssempliesOnStartup" within FodyWeavers, I get the error that it fails to execute weaver "LoadAssembliedOnStartup.Fody.dll"
Is there something I can do to solve this?
Geert van Horrik
@GeertvanHorrik
did you manually use a different (lower) version of Catel than orc.wizard uses?
note that it's best to let nuget fight out all dependencies, and we totally recommend you to use the latest alpha of Orc.Wizard since that will be released very soon
tm1k
@tm1k
Oh yes, this was the problem. I updated all packages according to the dependencies and it seems to work. The wizard window is damn small, in the output the error is that a ThemeManager is not initialized. I did not find any information about a theme manager, the only thing I found is the this.ApplyTheme() in Orc.Wizard.Example
Geert van Horrik
@GeertvanHorrik
You can call Orc.Thening.ThemeManager apply theme or something like that
And you can control the size of the wizard from within the wizard model
tm1k
@tm1k
Hm, the size is already set in the wizard model. Seems the theming error prevents it from be shown correctly?
tm1k
@tm1k
Somehow I can't either find a method for the initialization of ThemeManager nor anything in the Orc.Wizard.Example that I have not implemented. The error is still "Theming is not yet initialized, make sure to initialize a theme via ThemeManager first"
or use the AccentColor / BaseColorScheme methods and it should auto-apply it for you
tm1k
@tm1k
Boom! It works. Thanks a lot!
tm1k
@tm1k
Is it possible to access variable inside a wizard page that has been set by the user in a previous wizard page?
Geert van Horrik
@GeertvanHorrik
yes
a wizard page has a Wizard property, and that contains all the wizard pages available inside the wizard (including the state).
tm1k
@tm1k
I have a page selected with Linq from wizardPage.Wizard.Pages , but the ViewModel is null, so I cant access any variable. Am I missing something?
Geert van Horrik
@GeertvanHorrik
whenever a view model gets saved (SaveAsync), it's recommended to write data back to the Page model (view models are short-living objects).
In the example wizard, you can see how the summary page uses all other pages to determine the summary at the end