120 likes | 239 Views
Aplikacje sieciowe. Ritch Client Silverlight. Struktura dokumentu XAML. < UserControl xmlns =" http://schemas.microsoft.com/ winfx /2006/ xaml / presentation " xmlns : x =" http :// schemas.microsoft.com/ winfx /2006/ xaml "
E N D
Aplikacje sieciowe Ritch Client Silverlight
Struktura dokumentu XAML <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" mc:Ignorable="d" x:Class="SilverlightApplication1.MainPage" Width="640" Height="480"> <UserControl.Resources> <Storyboard x:Name="Storyboard1" > .... </Storyboard> </UserControl.Resources> <Grid x:Name="LayoutRoot"Background="White"> ... </Grid> </UserControl>
Przykład XAML <UserControl> ..... <Grid x:Name="LayoutRoot" Background="White"> <Rectangle Fill="#FFF4F4F5" Height="51" Stroke="Black" Width="137"HorizontalAlignment="Right" Margin="0,0,163,120"VerticalAlignment="Bottom"/> <EllipseFill="#FFF4F4F5"Height="30"Stroke="Black"Width="35"HorizontalAlignment="Right"Margin="0,0,265,90"VerticalAlignment="Bottom"/> <EllipseFill="#FFF4F4F5"Height="30"Stroke="Black"Width="29"HorizontalAlignment="Right"Margin="0,0,163,90"VerticalAlignment="Bottom"/> <Rectangle x:Name="rectangle"Fill="#FFF4F4F5"Height="28"Stroke="Black"Width="65"HorizontalAlignment="Right"Margin="0,0,200,171"VerticalAlignment="Bottom"/> </Grid> </UserControl>
Expression Blend • Interfejs • Narzędzia • Właściwości obiektów • Komponenty wizualne (kontrolki)
Struktura Projektu Aplikacji Silverlight • App.xaml • MainPage.xaml • Default.html
Podstawowa struktura strony Silverlight <sdk:Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"x:Class="SilverlightApplication1.NewPage" Title="NewPage Page" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot" > </Grid> </sdk:Page>
Umieszczenie aplikacji Silverlight na stronie www (Deafult.html) <htmlxmlns="http://www.w3.org/1999/xhtml"> <head> <title>SilverlightApplication1</title> <styletype="text/css">...</style> <scripttype="text/javascript"src="Silverlight.js"></script> <scripttype="text/javascript"> .... </script> </head> <body> ... <divid="silverlightControlHost"> <objectdata="data:application/x-silverlight-2,"type="application/x-silverlight-2"width="100%"height="100%"> <paramname="source"value="ClientBin/SilverlightApplication1.xap"/> <paramname="onerror"value="onSilverlightError"/> <paramname="background"value="white"/> <paramname="minRuntimeVersion"value="4.0.50826.0"/> <paramname="autoUpgrade"value="true"/> <ahref="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0"style="text-decoration: none;"> <imgsrc="http://go.microsoft.com/fwlink/?LinkID=161376" alt="Get Microsoft Silverlight"style="border-style: none"/></a> </object> <iframeid='_sl_historyFrame'style='visibility:hidden;height:0;width:0;border:0px'></iframe> </div> </body> </html>
Podstawowe elementy XAML • Layout • Grid • Canvas • Stackpanel • ... • Elementy graficzne • Rectangle • Elipse • Path • Kontrolki • Button • CheckBox • TextBox
Podstawowe elementy graficzne • Rectangle • Elipse • Path • ...
Elementy interfejsu użytkownika • Button • TextBox • TextBlock
Właściwości obiektów • Wizualne • Niewizualne