This project is read-only.

Signum framework with other WPF Control

Aug 24, 2010 at 10:01 PM

Is this possible to use Signum framework with other controls - and not the ones provided by Signum itself. For example if we wanted to use the the full of the database, service and other portions but wanted to use some 3rd part controls. What would be our options?

Aug 25, 2010 at 7:14 PM

The use of the controls offered by Signum.Windows is not required to use the signum ORM framework in a WPF application. 

In fact, with early versions of the framework we ourselves have used for a specific project only ORM functionality offered by the database engine, building all the controls manually. 
However, using it you can take all the advantages of integration offered by these controls (like autocomplete, automatic type selection, navigation among related entities, etc.).

To use manual controls instead of the ones provided by the framework you just have to act as with any entity in the outside world:

  1. Retrieve the entity from your logic tier (ultimately with Database.Retrieve() or Server.Retrieve()).
  2. Bind / represent the information in the control or window.
  3. Once the user finish editing data, apply / refresh changes on the entity and store it back into the db (through your logic tier with Database.Save() or Server.Save()).
Aug 27, 2010 at 12:04 PM

Thank you for response.

Does this mean that I will not be able to use as is the case in your example and will have to instead of use to save the data?

Do you have  a code snippet for example of how to setup the data context and bind a data grid using your logic, services and web layers. Basically I mean only in the windows portion if I have the standard WPF grid how do I bind that everything else in the backend? I'd appreciate if you had a code snippet to that effect.

Thank you!

Aug 27, 2010 at 3:18 PM

Hi there.

When you use myEntity.Save(), you are calling an extension method defined in Database class (in the server) or Server class (in the client). 

If you're making a Client-Server solution (common 3 tier app.), in your windows project you are using Server class, but if you're going the exotic way, connecting to the database straight from the windows project, so you can use Database class and forget about server. We have never tried that but should work.

About the example, if we're talking about binding normal entities to a WPF grid, the steps are the same as with any other object to bind in WPF. Here you have a little example of a binding in a ListView (binding for other controls of this kind goes on the same way):

Best regads

Aug 27, 2010 at 6:08 PM

I do understand how WPF data binding works. What I am not sure how would the controls be bound to the entities using signum framework via the services?

Aug 27, 2010 at 6:11 PM

I'd like to add that we are indeed trying to create a n-tier architecture.

Aug 30, 2010 at 9:48 AM

Just something like this: 

//On load
window.DataConctext = Server.Retrieve<CustomerDN>(4);

<TextBox Text={Bidning Name}/>

//On Save Click
((CustomerDN) windows.DataContext).Save(); //Server.Save is extension method 

Anyway, i'm sure your reality is more complex than this, but i'm not sure on what. 

Hope it helps,


Aug 30, 2010 at 2:44 PM

Would it possible for you to provide us consultancy for say 3-4 hours via Instant Messenger on the usage of this framework. We will be happy to pay you for your time. Please let us know.

Thank you!

Aug 30, 2010 at 11:57 PM

Sure, contact me in and we speak about it.