WPF and Silverlight Learning notes (ii): WPF and Silverlight Overview

Source: Internet
Author: User
Tags xmlns silverlight

WPF (Windows Presentation foundation,windows appearance base) is a new generation of Windows interface development technology based on the framework 3.0 (including later versions).

Silverlight (translated as "silver") can be viewed as a Web application product of WPF, previously named wpf/e. It is primarily applied to Web rich client applications (Ria,rich Interface application). At this stage of the technology can be said to compare the "fire", Microsoft's main opponent in this regard is the Adobe Company's Flash-based flex technology.

Both are based on XAML and can be converted to each other under certain conditions: such as defining a simple ARGB palette application:

The WPF application is as follows:

XAML file:

<window x:class= "Wpfcolorversion.mainwindow"
xmlns= "http://schemas.microsoft.com/winfx/2006/xaml/presentation& quot;
xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml"
title= "WPF Color Version" height= "width=" windowstartuplocation= "Centerscreen" resizemode= "noresize" >
<canvas margin= "0,0,0,0" >
<Canvas.Background>
<lineargradientbrush endpoint= "0.5,1" startpoint= "0.5,0" >
<gradientstop color= "#FF6254E2" offset= "0.996"/>
<gradientstop color= "#FFFFFFFF" offset= "0"/>
</LinearGradientBrush>
</Canvas.Background>
<textblock height= "canvas.left=" "canvas.top=" text= "WPF Color Version" textwrapping= "Wrap" fontsize= "24"

fontfamily= "Comic Sans MS" fontweight= "Bold"/>
<textblock height= "canvas.left=" "canvas.top=" fontfamily= "comic Sans MS" fontsize= "" "Fontweight=" Bold "

text= "WPF Color Version" textwrapping= "Wrap" rendertransformorigin= "0.5,0.5" >
<TextBlock.Foreground>
<lineargradientbrush endpoint= "0.5,1" startpoint= "0.5,0" >
<gradientstop color= "#FF000000" offset= "1"/>
<gradientstop color= "#FFD9DFF0" offset= "0.026"/>
<gradientstop color= "#FF7D818B" offset= "0.78"/>
</LinearGradientBrush>
</TextBlock.Foreground>
<TextBlock.RenderTransform>
<TransformGroup>
<scaletransform scalex= "1" scaley= "-1"/>
<skewtransform anglex= " -29" angley= "0"/>
<rotatetransform angle= "0"/>
<translatetransform x= "0" y= "0"/>
</TransformGroup>
</TextBlock.RenderTransform>
</TextBlock>
<rectangle fill= "#00000000" width= "156" height= "canvas.left=" "219" (canvas.top=), "108" x:name= "Demoarea"/>
<textblock width= "height=" canvas.top= "116" text= "A" textwrapping= "Wrap" canvas.left= "28" horizontalalignment= "Center"/>
<textblock width= "height=" "canvas.left=" canvas.top= "" "text=" R "textwrapping=" Wrap " horizontalalignment= "Center"/>
<textblock width= "height=" "canvas.left=" canvas.top= "166" text= "G" textwrapping= "Wrap" horizontalalignment= "Center"/>
<textblock width= "height=" "canvas.left=" canvas.top= "194" text= "B" textwrapping= "Wrap" horizontalalignment= "Center"/>
<slider width= "148" height= "canvas.left=" "canvas.top=", "maximum=" 255 "x:name=" Slidera "valuechanged=" Slidervaluechanged "/>
<slider width= "148" height= "canvas.left=" "canvas.top=" 137 "maximum=" 255 "x:name=" Sliderr "ValueChanged=" Slidervaluechanged "/>
<slider width= "148" height= "canvas.left=" "canvas.top=" 163 "maximum=" 255 "x:name=" Sliderg "ValueChanged=" Slidervaluechanged "/>
<slider width= "148" height= "canvas.left=" "canvas.top=" 189 "maximum=" 255 "x:name=" Sliderb "ValueChanged=" Slidervaluechanged "/>
<textblock width= "height=" canvas.left= "143" canvas.top= "230" text= "Color Value:"/>
<textbox width= "height=" canvas.left= "219" canvas.top= "" "text=" #00000000 "x:name=" Txtcolorvalue "/>
</Canvas>
</Window>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.