Stable and stable indexing of Silverlight 2.0 series articles

Source: Internet
Author: User
Tags polyline
[Download source code]

Stable and stable indexing of Silverlight 2.0 series articles

Author: webabcd

Online DEMO
Http://www.cnblogs.com/webabcd/archive/2008/10/09/1307486.html

1. Stable and stable Silverlight (3)-2.0 controls: Border, Button, Calendar, Canvas, CheckBox, ComboBox
Introduction
Silverlight 2.0 controls: Border, Button, Calendar, Canvas, CheckBox, ComboBox

2. Steadily create the DataGrid, DatePicker, Grid, GridSplitter, HyperlinkButton, and Image of the Silverlight (4)-2.0 control.
Introduction
Silverlight 2.0 controls: DataGrid, DatePicker, Grid, GridSplitter, HyperlinkButton, Image

3. Use the ListBox, MediaElement, MultiScaleImage, PasswordBox, ProgressBar, and RadioButton controls in Silverlight (5)-2.0.
Introduction
Silverlight 2.0 controls: ListBox, MediaElement, MultiScaleImage, PasswordBox, ProgressBar, RadioButton

4. Steady Silverlight (6)-2.0 controls: ScrollViewer, Slider, StackPanel, TabControl, TextBlock, TextBox, ToggleButton
Introduction
Silverlight 2.0 controls: ScrollViewer, Slider, StackPanel, TabControl, TextBlock, TextBox, ToggleButton

5. Stable and stable Silverlight (7)-2.0 Ellipse, Line, Path, Polygon, Polyline, Rectangle
Introduction
Silverlight 2.0 graphics:
Ellipse-elliptic
Line-Line
Path-a series of interconnected straight lines and curves
Polygon-Polygon, closed image, automatically connected from the start point to the end point
Polyline-non-closed figure, a string of connected lines. The start and end points are not automatically connected.
Rectangle-Rectangle

6. Stable and stable Silverlight (8)-2.0 base class of graphics System. Windows. Shapes. Shape
Introduction
Silverlight 2.0 graphics: base class System. Windows. Shapes. Shape (Ellipse, Line, Path, Polygon, Polyline, Rectangle are inherited from the abstract class System. Windows. Shapes. Shape ).
Fill-Fill; Stroke-Stroke (Border)
StrokeThickness-stroke (Border) Size
Stretch-Stretch Value
Set of StrokeDashArray-dotted line and gap values
StrokeDashCap-type of the two ends of the dotted line (line cap)
StrokeStartLineCap-type of the starting end (line cap) of the dotted line
StrokeEndLineCap-type of the dotted line terminator (line cap)
StrokeDashOffset-start position of the dotted line. Draw the dotted line from the distance between the StrokeDashOffset at the starting end of the dotted line
StrokeLineJoin-connection type at the graphic connection point
StrokeMiterLimit-ratio of the diagonal length to StrokeThickness/2. The default value is 10 and the minimum value is 1.

7. Stable and stable Silverlight (9)-2.0: SolidColorBrush, ImageBrush, VideoBrush, LinearGradientBrush, RadialGradientBrush
Introduction
Silverlight 2.0 paint brush:
SolidColorBrush-monochrome paint brush
ImageBrush-image paint brush
VideoBrush-video paint brush
LinearGradientBrush-linear gradient Paint Brush
RadialGradientBrush-radioactive gradient Paint Brush

8. Steady and steady Silverlight (10)-2.0 other Transform details, as well as common attributes of UIElement and FrameworkElement
Introduction
Silverlight 2.0 others:
RenderTransform-Transform the rendering position (System. Windows. Media. Transform type)
RenderTransformOrigin-center point of location Conversion
Clip-the editing area of the container (System. Windows. Media. Geometry type)
IsHitTestVisible-whether the hit test is visible
Opacity-Opacity. Between 0 and 1
OpacityMask-opaque mask (mask) (System. Windows. Media. Brush Type)
UseLayoutRounding-whether to use the complete pixel Layout
Cursor-The mouse pointer style when you move the Cursor over the FrameworkElement
Margin-the gap distance between the container edge and the edge (pixel value: up/down; left/right; up/down; left/up/down)
Tag-Save some additional information (System. Object type)

9. Stable and stable ColorAnimation, DoubleAnimation, PointAnimation and Key Frame Animation in Silverlight (11)-2.0 Animation
Introduction
Silverlight 2.0 Animation:
ColorAnimation-linear interpolation animation processing between two Color values
DoubleAnimation-linear interpolation animation between two Double values
PointAnimation-linear interpolation animation between two Point values
Interpolation of Key Frame Animation-interpolation of key frames in Color, Double, or Point animation for linear, discrete, and cubic besell Curves
Dynamic Change animation-dynamically change the animation through Program Control

10. Steadily create a Silverlight (12)-2.0 style, template, visual status, and visual status Manager
Introduction
Silverlight 2.0 visual control: Style, Template, visual state, and visual State Manager)

11. Steady Silverlight (13)-2.0 interaction with mouse and keyboard events
Introduction
Silverlight 2.0 Human-Computer Interaction: responds to users' mouse and keyboard operations.
MouseEnter-events triggered when the mouse enters (obviously, this event cannot be bubbling)
MouseLeave-events triggered when the mouse leaves (obviously, this event cannot be bubbling)
MouseLeftButtonDown-events triggered when you press the left mouse button
MouseLeftButtonUp-events triggered when you press and release
MouseMove-events triggered when the mouse moves
MouseEventArgs. GetPosition ()-coordinates of the mouse relative to the specified Element
MouseButtonEventArgs. Handled-whether the event has been processed
KeyDown-events triggered when the mouse is pressed
KeyUp-events triggered when you press and release the mouse
KeyEventArgs. Key-Event-related keyboard buttons [Input. Key enumeration]
KeyEventArgs. Handled-whether the event has been Handled
Keyboard. Modifiers-the currently pressed secondary key [Input. ModifierKeys enumeration]

12. Stable and stable Silverlight (14)-2.0 interaction InkPresenter (graffiti)
Introduction
Silverlight 2.0 Human-Computer Interaction: InkPresenter (graffiti ).
InkPresenter-graffiti board, that is, the ink on the panel. InkPresenter can contain child Controls
Cursor-The mouse pointer style when the mouse moves over InkPresenter
Background-graffiti Background
Opacity-Opacity of ink marks on the panel
Clip-InkPresenter's editing area
Appearance attribute of Stroke. DrawingAttributes-Stroke (Stroke)
UIElement. CaptureMouse ()-enable Mouse capture for the UIElement object
UIElement. ReleaseMouseCapture ()-Release the Mouse capture for the UIElement object

13. Stable and stable one-time binding of Silverlight (15)-2.0 data, one-way binding, two-way binding, INotifyPropertyChanged, data conversion, and data verification
Introduction
Silverlight 2.0 Data Binding:
Binding-link the attributes of the bound target object with the data source
INotifyPropertyChanged-notifies the client that a property value has been changed
IValueConverter-value conversion API, which converts a value of one type to a value of another type. It provides a way to apply custom logic to binding
BindingValidationError-this event is triggered when a verification error occurs or the last verification error is resolved.

14. Stable and stable Silverlight (16)-2.0 independent Storage of data (Isolated Storage)
Introduction
Independent Storage of Silverlight 2.0 data (Isolated Storage ):
IsolatedStorageFile-class for operating independent storage;
IsolatedStorageFile. GetUserStoreForSite ()-obtain the user's independent storage by site
IsolatedStorageFile. GetUserStoreForApplication ()-obtain the user's independent storage by Application
Isolatedstorageset-key-value dictionary table saved in independent storage
IsolatedStorageSettings. SiteSettings-dictionary table saved by site
IsolatedStorageSettings. ApplicationSettings-dictionary table by key-value saved by Application

15. The detailed description of data in Silverlight (17)-2.0 and ListBox
Introduction
Silverlight 2.0 details about DataGrid, bind data to ListBox:
AutoGenerateColumns-whether to automatically generate columns Based on the Data Source
RowDetailsVisibilityMode-display mode used to display detailed data of the corresponding row
DataGrid. RowDetailsTemplate-template used to display detailed data of the corresponding row
AreRowDetailsFrozen-whether to freeze RowDetailsTemplate
GridLinesVisibility-Display Mode of table separation lines
RowBackground-Background of odd data rows
AlternatingRowBackground-Background of even data rows
IsReadOnly-whether the cell is read-only
FrozenColumnCount-Total number of frozen columns in the table (from the left)
SelectionMode-row selection mode
CanUserReorderColumns-whether to allow column dragging
CanUserResizeColumns-whether to allow changing the column width
CanUserSortColumns-whether to allow column sorting

16. Steady and steady Silverlight (18)-2.0 video details MediaElement, developing a simple full-featured player
Introduction
Silverlight 2.0 details MediaElement: Develop a simple full-featured player.
Source-media address to be played
Stretch-Stretch Value
AutoPlay-whether to play media automatically
CurrentState-Playback status
Position-Media Position
DroppedFramesPerSecond-Number of frames being discarded by the media per second
BufferingProgress-buffer progress
DownloadProgress-download progress
NaturalDuration-media file duration;
Volume-Volume size
Balance-volume balancing
BufferingTime-the length of time to buffer
CurrentState-Playback status
IsMuted-whether to mute
Play ()-Play media
Pause ()-Pause Media Playback
Stop ()-Stop Media Playback

17. Stable and stable Silverlight (19)-2.0 call the REST service for communication, processing data in JSON, XML, and RSS/ATOM formats
Introduction
Silverlight 2.0 calls the REST service to process data in JSON, XML, and RSS/ATOM formats.
Call the REST service through the System. Net. WebClient class
Use the class in the System. Json naming control to process JSON data
Use the class (Linq to Xml) in the System. XML. LINQ namespace to process XML data
Use the class in the System. ServiceModel. Syndication namespace to process RSS/ATOM data

18. Stable and stable Silverlight (20)-2.0 communication-WebClient, uploads/downloads data in the form of strings, and uploads/downloads data in the form of streams
Introduction
Silverlight 2.0 details WebClient, which uploads and downloads data in the form of strings; uploads and downloads data in the form of streams.
WebClient-a class that sends data to a specified URI or receives data from a specified URI
DownloadStringAsync (Uri address, Object userToken)-download the resource of the specified URI in the form of a string
UploadStringAsync (Uri address, string data)-uploads data to the specified URI in the form of a string. The default HTTP method is POST.
OpenReadAsync (Uri address, Object userToken)-download resources of a specified URI in the form of a stream
OpenWriteAsync (Uri address, string method, Object userToken)-open the stream to write data to the specified URI using the specified method

19. The WebRequest and WebResponse of Silverlight (21)-2.0 communication are fixed in a steady manner. Requests are sent to and responses are received to the specified URI.
Introduction
Silverlight 2.0 describes WebRequest and WebResponse in detail, performs GET and POST requests on the specified URI, and receives its response.
HttpWebRequest-send a request to the specified URI
Create ()-initialize a WebRequest
BeginGetResponse ()-starts asynchronous requests for specified URI Resources
EndGetResponse ()-end asynchronous request to the specified URI Resource
HttpWebResponse-responds to the specified URI
GetResponseStream ()-Get the response data stream

20. Use Silverlight (22)-2.0 to call the WCF Service and encrypt the transmission information.
Introduction
Silverlight 2.0 calls the WCF Service to encrypt messages transmitted between the client and the server. Using "add service reference" in Visual Studio 2008 automatically generates a proxy class. Only BasicHttpBinding is supported.

21. Stable and stable Silverlight (23)-2.0 communication: Call the two-way communication (Duplex Service) of WCF)
Introduction
Silverlight 2.0 calls the two-way communication Service (Duplex Service) of WCF ).
Develop a program that actively sends stock information to the client. First, the client sends the stock code of the stock to be monitored to the server, the server then pushes the information to the client when the stock information changes.

22. Securely Socket Silverlight (24)-2.0 communication and develop a multi-user chat room
Introduction
Silverlight 2.0 Socket communication. Develop a multi-person chat room.
Server: instantiate Socket, bind, listen, connect, receive data, send data
Client: instantiate Socket, specify the server address, connect, receive data, send data

23. Steadily hitting the Thread, Timer, BackgroundWorker, and ThreadPool of Silverlight (25)-2.0 threads
Introduction
Silverlight 2.0 uses Thread, Timer, BackgroundWorker, and ThreadPool for multi-Thread development.
Thread-class used for Thread creation and Control
Timer-class used to execute the specified method at a specified interval
BackgroundWorker-used to run operations on individual threads
ThreadPool-management class of Thread Pool

24. Steadily Lock, Interlocked, EventWaitHandle, Monitor, ThreadStaticAttribute of Silverlight (26)-2.0 threads
Introduction
Silverlight 2.0 uses Lock, Interlocked, EventWaitHandle, and Monitor to implement thread synchronization.
Lock-ensure that the code block is running without being interrupted by other threads
Interlocked-Provides atomic operations for variables shared by multiple threads
EventWaitHandle-Indicates whether other threads can be imported.
Monitor-provides a mechanism for Synchronous Object Access
ThreadStaticAttribute-the specified static variable is unique to each thread.

25. Stable and stable Silverlight (27)-2.0 scripting of web pages, interaction with DOM, and interaction with JavaScript
Introduction
Silverlight 2.0 uses c # To develop scripted code, interaction between Silverlight and the DOM of the host page, and interaction between Silverlight and the JavaScript of the host page.
ScriptableMemberAttribute-the attributes, methods, and events to be scripted must be marked
HtmlPage. RegisterScriptableObject-register a scripted object to the client
HtmlElement-HTML elements in the Document Object Model (DOM) of a webpage
HtmlWindow-provide the managed representation of the Silverlight end of the JavaScript window object

26. Stable and stable Silverlight (28)-2.0 communication call ADO. NET Data Services (Data Service)
Introduction
Silverlight 2.0 calls ADO. NET Data Services (Data Service ). This document uses the Northwind database as the example database to create a Demo of adding, querying, updating, and deleting databases.
In Silverlight 2.0, data services can only be called asynchronously. In addition, data services must be deployed in the same domain as the Silverlight host.
System. Data. Services. Client. DataServiceContext-Data Service Context
System. Data. Services. Client. DataServiceQuery-query Data Services using the specified URI syntax
AddObject (), UpdateObject (), DeleteObject ()-used to add, update, and delete objects
BeginExecute ()/EndExecute (), BeginExecuteBatch ()/EndExecuteBatch-used to execute a DataServiceQuery query or batch execution (submit a group of queries to the data service at one time)
BeginSaveChanges ()/EndSaveChanges ()-used to submit changes to an object (add, delete, modify)
BeginLoadProperty ()/EndLoadProperty ()-used to load the value of a specified attribute. It is used to load a navigation attribute.
AddLink (), SetLink (), and DeleteLink (): create a connection, add status (one-to-many), create a connection, and add status (Multiple-to-one); delete a connection, and delete a connection.

27. Press the Silverlight (29)-2.0Tip/Trick Cookie in a steady manner, customize the font, PASS Parameters for the program, right-click the program, and commonly used configuration parameters.
Introduction
Silverlight 2.0 tips and tips Series

  • Cookie-use JavaScript to operate cookies
  • Custom font-use a Custom font in a program
  • Passing parameters for the program-passing initialization parameters for the Silverlight Program
  • Right-click a Custom button to respond to and process a custom right-click event
  • Common Program configuration parameters-common parameters marked by the object and common properties of the corresponding Silverlight Control

28. Stable and stable Silverlight (30)-2.0Tip/Trick Silverlight. js, Silverlight. supportedUserAgent. js, custom startup interface, and response to mouse wheel events
Introduction
Silverlight 2.0 tips and tips Series

  • Silverlight. js-some js help functions are used to embed the Silverlight plug-in and customize the installation experience.
  • Silverlight. supportedUserAgent. js-this function is used to determine whether Silverlight supports the user's browser.
  • Custom startup interface-comprehensive application of three parameters: splashScreenSource, onSourceDownloadProgressChanged, onSourceDownloadComplete
  • Respond to scroll wheel events-respond to and process scroll wheel events

29. Press Silverlight (31)-2.0Tip/Trick to load XAP, load XAML, load DLL, AppManifest. xaml file description, and customize the mouse pointer.
Introduction
Silverlight 2.0 tips and tips Series

  • Load XAP-load the specified xap file to the current Silverlight Application
  • Load XAML-load the specified xaml file to the current Silverlight Application
  • Load DLL-load the specified dll file and call the method or load the control
  • Description of the AppManifest. xaml file-Brief description of the roles of each node in the AppManifest. xaml File Content
  • Custom mouse pointer-implement custom mouse pointer, that is, the mouse follows

30. Stable and stable Silverlight (32)-2.0Tip/Trick MessageBox, Popup, loop implementation methods, dynamic theme conversion, localization (multi-language), response to double-click events
Introduction
Silverlight 2.0 tips and tips Series

  • Demo of MessageBox-MessageBox
  • Popup-Popup window demonstration
  • Implementation methods of loops-DispatcherTimer, Storyboard, Timer, and CompositionTarget. Rendering
  • Dynamic theme conversion-demonstrate how to dynamically change theme
  • Localization (multi-language)-demonstrate how to support multiple languages
  • Responding to double-click events-responding to and handling double-click events

OK
[Download source code]

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.