What is the equivalent for Datamodule in Delphi Prism XE? How data binding is supported in Winform applications using Delphi Prism XE?
About you first question
In .NET there is no such thing as a delphi Datamodule.
Now about the data binding.
The data binding in .net between Winforms controls and a datasource is made using the DataBindings property wich is present in most of the winforms visual controls.
read these articles for more info about this topic.
Data binding concepts in .NET windows forms
Data Binding in .NET / C# Windows Forms
Related
Can anyone suggest a pattern to open/manage popup windows in a WPF MVVM(Prism) .Net Core application? I was using Prism's PopupWindowAction before. Now XAML Behaviors for WPF are ported to .Net Core (https://weekly-geekly.github.io/articles/433334/index.html), but Interaction.Triggers doesn't accept InteractionRequestTrigger.
It's called IDialogService, see this issue at Github.
Is it possible to use a .NET Windows Forms control directly in a VB6 form?
The goal here would be to use the more up to date .NET controls in a legacy VB6 application. We already have a mixed .NET / VB6 environment.
I am aware of the Microsoft InteropForms Toolkit but it is described as being used for exporting custom usercontrols to VB6 from .NET. This doesn't seem to provide for preexisting controls (but I could be wrong).
I have tried to simply reference System.Windows.Forms.tlb in a VB6 project as a component library - but it does not allow this to be selected, which seems to imply it has no ActiveX controls inside it.
I'm aware you can easily do the reverse - eg use a VB6 usercontrol on a .NET winforms form. That's not what I need.
You can reference the System.Windows.Forms assembly in a normal way from VB6 - and wind up with a line such as the following in your VBP:
Reference=*\G{215D64D2-031C-33C7-96E3-61794CD1EE61}#2.4#0#C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Windows.Forms.tlb#System_Windows_Forms
but this doesn't provide access to place controls on a form.
I did that before.
I created a control (with the forms control you want use) in .net (exported to tlb using InteropFormsToolkit) and created a vb6 control where I put that .net control.
It was necessary to map all the properties, events and methods that I wanted to use.
In forms vb6 I added this vb6 control, with the .net encapsulated.
It worked!
Is Silverlight a subset of WPF? If i learn WPF then can i say i know Silverlight too?
Silverlight is similar to WPF, and actually started out as WPF/E (WPF Everywhere) but at some point, it became a separate implementation and it is not directly compatible with WPF.
That said, most of the techniques and classes that you would learn in WPF will have a Silverlight variant. One primary exception being the 3D visualization facilities in WPF are not available in Silverlight.
Silverlight is still coded in a Silverlight-specific .NET run-time (a slimmer version than the full .NET run-time) and you still use XAML to describe your presentations.
It should also be noted that Silverlight does have built-in restrictions with accessing resources on the machine it is running on. For example, Silverlight applications can not access the registry. There are enhancements in Silverlight though that do allow for "out of browser" applications which can be given full-trust privileges.
The one big difference between Silverlight and WPF is the CLR (Common Language Runtime) and that Silverlight is Sandboxed, so you don't get alot of functionality you can get with WPF.
If you know WPF XAML and Model-View type aspects of programming styles with e.g Dependency propertys then you will find it quite easy to use Silverlight.
One big thing with Silverlight is that you cant reference C# non silverlight classes, you must use these types of classes via WCF.
These both are same or different ?
How to develop silverlight in visual studio 2008 ?
UPDATE
Please also answer
How to develop silverlight application in visual studio 2008 ?
Both WPF and Silverlight uses what is called XAML to define what the interface / GUI should look like. WPF and Silverlight are both Presentation Layers used on different areas.
WPF is used for Windows based applications whereas Silverlight is used for Web based applications.
Read this blog post about "When should I use WPF vs Silverlight?" over at MSDN.
You can think about Silverlight like a subset of WPF, but there is one main difference. WPF uses full .Net Framework and Silverlight uses different dlls (so you can't use all classes from .Net framework in SL).
Of course Silverlight is a presentation technology that you use to create browser base application (SL can be also an out of browser application) and WPF is used to create windows applications.
Silverlight's original code name was WPF/E with the E standing for "Everywhere". That should help understand the origin of it.
It was designed a a reduced and portable version of WPF, but now both seem to diverge a bit. Here is a good article on how they diverge: WPF Compatibility
What examples exist of Windows Presentation Foundation (WPF) Model View ViewModel (MVVM) that include sample database connections?
you could have a look at those:
http://www.codeproject.com/KB/WPF/WPF_MVVM_DB_Access.aspx
or just this:
http://www.google.com/search?q=mvvm+database
The BookLibrary (WPF MVVM) sample application of the WPF Application Framework (WAF) uses the Entity Framework in combination with a SQL CE database.
I would recommend Building Enterprise Applications with Windows Presentation Foundation and the Model View ViewModel Pattern publish by Microsoft.
http://shop.oreilly.com/product/0790145309686.do#tab_04_0
you can find the source code here
http://examples.oreilly.com/9780735650923-files/