Interesante "correspondencia" entre XAML y los .FRM de los viejos (que aun utilizo) proyectos de VB6 en un post de Tom Hollander titulado VB4: "XAML, I am your father" . Lo capte al post rapidamente por dos cosas VB y la sugerencia a Startwars ;)
Hace un paralelismo entre estos dos diferentes tipos de metadata. No espero realizar un debate (ni con mis compañeros de trabajo) , ademas mas de una vez manipulamos estos archivos .frm, o .vbp de VB6 para arreglar alguna mala referencia, incluso en una oportunidad arreglando el un menu en VB6
También esto de definir formularios con xml como metadata ya habia testeado cuando jugaba con Flex y sus .mxml (en sus etapas beta) y me parecia bueno.. solo que la herramienta lo generaba cuando haciamos drag & drop era una separada Dreamweaver (parecido ya que se tomo como base esto mismo). Encima necesitaba ejecutar un sevidor de aplicaciones Java, asi que despues de las beta perdi el rastro de esta tecnología espero algun dia volver a utilizarla (si vuelve Soda Stereo porque yo no je!)
| XAML | VB5 | MXML |
<wf:Form x:Class="XamlWinForms.Window1" xmlns:x="http://schemas.microsoft.com /winfx/2006/xaml" xmlns:wf="clr-namespace:System.Windows.Forms; assembly=System.Windows.Forms" xmlns:sys="clr-namespace:System; assembly=mscorlib" Text="Window1" Height="300" Width="300" > <wf:Form.Controls> <wf:Panel BackColor="#00FFFF" Dock="Fill" BorderStyle="Fixed3D"> <wf:Panel.Controls> <wf:Button Text="Click Me!" Left="50" Top="50" Width="100" Height="50" Click="Button_Click"> </wf:Button> <wf:ListBox Top="120" Left="20"> <wf:ListBox.Items> <sys:String>Foo</sys:String> <sys:String>Bar</sys:String> </wf:ListBox.Items> </wf:ListBox> </wf:Panel.Controls> </wf:Panel> </wf:Form.Controls> </wf:Form> |
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 3690
ForeColor = &H0000FFFF&
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3090
ScaleWidth = 3690
StartUpPosition = 3 'Windows Default
Begin VB.Timer Timer1
Interval = 1000
Left = 3000
Top = 2280
End
Begin VB.CommandButton Command1
Caption = "Press to Play"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 720
MaskColor = &H008080FF&
TabIndex = 0
Top = 2400
Width = 2175
End
Begin VB.Shape Shape1
FillColor = &H000000FF&
FillStyle = 0 'Solid
Height = 615
Index = 8
Left = 2280
Shape = 5 'Rounded Square
Top = 1080
Width = 495
End
End |
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx= "http://www.macromedia.com/2003/mxml">
<mx:WebService id="wsStock"
wsdl="http://services.xmethods.net/soap/ urn:xmethods-delayed-quotes.wsdl">
<mx:operation name="getQuote">
<mx:request>
<symbol>{symbol.text}</symbol>
</mx:request>
</mx:operation>
</mx:WebService>
<mx:Label text="Enter a symbol:"/>
<mx:HBox>
<mx:TextInput id="symbol"/>
<mx:Button label="Get Quote" click='wsStock.getQuote.send()'/>
</mx:HBox>
<mx:Label id="quote" fontWeight="bold" text="{wsStock.getQuote.result}"/>
</mx:Application> |
Buscando en Geeks.ms (que comunidad...!) encontre este interesante post del elBruno
- Migrando de VB6 a WPF ... the easy way !!!
Donde nos comenta sobre VB6(2)WPF
Me imagino que hace una correspondecia de estas propiedades que tenemos mas arriba, pero bueno el que necesita tiene algo para testear ;)
Y una frase al final que me gustaria reproducir: "it's nice to know that good ideas like this don't die"
Comparte este post: