in

DotNetSide

Dot Net South Italy Developers User Group

Tips

XAML inline code

Autore: Vito Arconzo

Uno degli aspetti interessanti del nuovo linguaggio di markup XAML è la possibilità di avere del codice inline.

Ecco come:

<Window x:Class="WindowsApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Loaded="Window1_Loaded"> <x:Code> <![CDATA[ void Window1_Loaded(object sender, RoutedEventArgs e) { this.Title="Titolo...."; TextBox txt = new TextBox(); txt.Text="hello dotnetsiders!!!"; this.Content=txt; } ]]> </x:Code> </Window>
Only published comments... Nov 27 2006, 05:23 PM by VitoA
Filed under:
Powered by Community Server (Commercial Edition), by Telligent Systems