Sunteți pe pagina 1din 9

SumITUp

A Complete Summary for Our 70-505 Practice Test


TS: Microsoft .NET Framework 3.5, Windows Forms Application Development - C#
SumITUp is a great summary recap of the objectives & material covered on the exam. Use it in addition to or in concert with your practice test as: A bulleted overview of the exam scope and objectives before you start your study to provide you with the big picture objective by objective. A checklist & review of topics covered within each objective to ensure you have studied all the critical areas. A tool you can print out for review on the go. A rapid review tool for the day before you take the exam.
Copyright 2009 MeasureUp. All Rights Reserved

SumITUp | A Complete Summary for Our 70-505 Practice Test

Creating a UI for a Windows Forms Application by Using Standard Controls


Add and configure a Windows Form
The TransparencyKey property specifies the color that represents transparent areas on a form - Background pixels that are the same color as the value of the TransparencyKey property become transparent and do not respond to mouse actions - The BackColor property determines the background color of the form - The Region property of a form can be set to an object of type Region to create a form that is nonrectangular - Pass a GraphicsPath object to the Region constructor

Manage control layout on a Windows Form


When you need to create a number of controls or set a number of control properties dynamically, you should call the SuspendLayout method to improve performance Normally each change to a property of a form or control causes that object's Layout event to fire To calculate the setting for the SplitterDistance based on the default size of the bottom window, use the following formula - SplitterDistance = Control Height - Bottom Window Height - SplitterWidth

Add and configure a Windows Forms control


The BalloonTipClicked event is raised whenever a user clicks the balloon tip that is displayed for the NotifyIcon control - To display the balloon tip, you must call the ShowBalloonTip method and specify the number of milliseconds that the balloon tip should be displayed By default, the ShowUpDown property of the DateTimePicker control is set to False, which indicates that the control should simulate a drop-down control that displays a MonthCalendar control - The MonthCalendar control allows users to change the selected date The ErrorImage property of the PictureBox control specifies the image that should be displayed only if the image that you are trying to load dynamically fails The FlowLayoutPanel is a container that dynamically positions controls

Create and configure menus


The DropDownItems property of a ToolStripMenuItem control represents a collection of child menu items A class derived from ToolStripControlHost can be added to a ToolStrip control or any class that derives from a ToolStrip control A ToolStripContainer is a class that resides on a form and has four side-docked panels. - It serves as the container for one or more ToolStrip, MenuStrip, or StatusStrip controls

Create event handlers for Windows Forms and controls


When a user changes his or her preferences, the CLR raises the UserPreferenceChanged event

Copyright 2009 MeasureUp.

SumITUp | A Complete Summary for Our 70-505 Practice Test

- The delegate for this event specifies an instance of the UserPreferenceChangedEventArgs class, which contains a Category property that specifies the type of preference change that occurred

Integrating Data in a Windows Forms Application


Implement data-bound controls
When you bind a DataGridView control to a DataSet instance, the DataSource property identifies the DataSet control and the DataMember property specifies the table from which to obtain the data Every Windows Forms control has a DataBindings property that represents a collection of Binding instances that bind the properties of controls to data source members The Binding class allows a control's property to be automatically updated when a data source member changes, and vice versa Every Windows Forms container control contains a BindingContext instance that provides binding support to multiple data sources - Different properties of the same control can bind to members of different data sources The BindingContext class manages a collection of BindingManagerBase instances that enable synchronization of data-bound controls that are bound to the same data source The BindingManagerBase class contains a Position property that allows you to navigate the records returned by a data source

Manage connections and transactions


The SqlDataSourceEnumerator class allows you to enumerate registered SQL Server instances - To obtain the instances, you must call the GetDataSources method of the static Instance property When you open connections to a Microsoft SQL Server database, the Microsoft .NET Data Provider for SQL Server creates a connection pool for each unique connection string - For multiple connections to share the same connection pool, every parameter in the connection string of each connection must match exactly A valid SQL Server instance is one that specifies both the server name and the instance name - This is because multiple SQL Server instances can exist on the same server A TransactionScope object is used to enlist one or more statements in a single transaction The CommitableTransaction object allows you to perform transaction processing asynchronously - To do so, you must instantiate a CommitableTransaction object and call BeginCommit, passing a callback function - When the transaction completes, the callback function is called and an AsyncResult object is passed as an argument - The AsyncResult stores state of the asynchronous operation

Create, add, delete, and edit data in a connected environment


The NextResult method advances the cursor to the next result set when multiple result sets are returned The ExecuteScalar method returns single-value row sets

Copyright 2009 MeasureUp.

SumITUp | A Complete Summary for Our 70-505 Practice Test

Query data from data sources by using LINQ


When using Visual Basic to execute a LINQ query that performs an aggregate calculation, such as Count, you need to specify clauses in the following order: Aggregate, Where, Into When using C# to execute a LINQ query, you need to specify clauses in the following order: from, where, select - You can execute an aggregate function on the result of the query When you use a LINQ query, you can group objects by the value of a field into a temporary group variable

Create, add, delete, and edit data in a disconnected environment


The MethodsParameterType property indicates whether the parameters passed to a stored procedure or SQL statement should use CLR primitive types or SQL types

Manage XML with the XML Document Object Model (DOM)


The ChildNodes property of an XmNode returns a collection of XmlNode instances hierachically beneath the current node The Attributes property of the XmlElement instance returns a collection of attribute nodes (XmlAttribute instances) that are defined on the element - To retrieve a specific attribute, you can pass a String value to this property that represents the name of the attribute to retrieve The NodeChanging event is raised when an XML node is about to be changed The NodeInserting event is raised when an XML node is about to be inserted into the XML DOM

Read, write, and validate XML by using the XmlReader class and the XmlWriter class
When reading large amounts of XML data, you should use the XmlReader class for efficiency - This class represents a forward-only, read-only cursor for XML data The XmlReader class is efficient because the entire XML document does not need to be loaded into memory for processing - One drawback of using the XmlReader class is that once you read a particular node, you can no longer access its ancestors or previous siblings You can use the XmlReader class to validate XML data by passing an instance of XmlReaderSettings to the XmlReader constructor The XmlReaderSettings class contains a ValidationType property that specifies the type of validation, if any, to be performed when the XML data is read - The ValidationType property supports three values: DTD, Schema, and None

Implementing Printing and Reporting Functionality in a Windows Forms Application


Manage the print process by using print dialogs
When you create an instance of the PrintDialog class, you must set its Document property to the PrintDocument instance that represents the document to be printed

Copyright 2009 MeasureUp.

SumITUp | A Complete Summary for Our 70-505 Practice Test

The PrintPreviewDialog class represents the standard Print Preview dialog box that should be familiar to Windows users - It allows you to preview documents to determine how the printed copies will look The PageSettings class contains properties that allow you to change the paper size, orientation, and margins The PaperSize property allows you to set the paper size The Landscape property allows you to specify whether the orientation should be landscape or portrait The Margins property allows you to set the page margins

Construct print documents


To require a document to be printed to a specific printer, you must create a PrinterSettings instance and set its Name property to the name of the printer - Next, set the PrinterSettings property of the PrintDocument class to the PrinterSettings instance To manually print pages by using the base PrintDocument class, you must handle the PrintPage event - The delegate for this event defines a PrintPageEventArgs parameter - The PrintPageEventArgs class contains a property named HasMorePages that indicates whether the PrintPage event should be raised again o As long as you set this property to True, the PrintPage event will continue to be raised

Create a customized PrintPreview component


The PrintPreviewControl class represents a customizable print preview control that you can add to custom forms The PrintPreviewControl class can only display a preview of a document when the Document property is set

Enable security features for printing in a Windows Forms application


To prevent an assembly from loading if the code access policy does not grant the assembly the necessary permission, you need to define the RequestMinimum security action To create an unrestricted printing permission, you should create an instance of the PrintingPermission class and pass either the PrintingPermissionLevel.AllPrinting enumeration member or the PermissionState.Unrestricted enumeration member as a parameter

Enhancing Usability
Perform drag-and-drop operations
The ItemDrag event of the TreeView control is raised when a user begins to drag a node in the TreeView control The Data property of the DragEventArgs class is an instance of IDataObject, which provides methods for transferring data either from the Clipboard or between components in drag-and-drop operations - You must call the GetData method of the IDataObject interface to obtain the data to be dropped - This method accepts a data format that indicates the type of data that is returned The DragOver event is raised as the mouse cursor moves over a control during a drag-and-drop operation

Implement globalization and localization


The CurrentCulture property specifies the culture to use for formatting numbers, currencies, dates, and times The CurrentUICulture property specifies the culture used to look up language translations in the resource files
Copyright 2009 MeasureUp.

SumITUp | A Complete Summary for Our 70-505 Practice Test

A culture consists of both a language and a region

Implement accessibility features


The Use High Contrast option on the Display tab of the Accessibility Options dialog box allows visually impaired users to view controls by using high contrast colors and font sizes The AccessibleRole property reports the role of the control in the user interface - By default, the property is set to the control's class

Create and configure multiple-document interface (MDI) forms


The MDIChildActivate event occurs in the parent form when a different MDI child form becomes the active child form

Create, configure, and customize user assistance controls and components


The ErrorProvider component displays a blinking icon when you call its SetError method A HelpProvider component allows you to display a tooltip when a user presses the F1 key - The SetHelpNavigator method is used to determine which page of the help file to display if no keyword is passed or how to interpret the keyword

Persist Windows Forms application settings between sessions


The Reload method of the ApplicationSettingsBase class forces the application to revert all settings to their last saved values The Reset method of the ApplicationSettingsBase class forces the application to load default values for all settings

Implementing Asynchronous Programming Techniques to Improve the User Experience


Manage a background process by using the BackgroundWorker component
The BackgroundWorker component allows you to perform tasks using a background thread rather than the user interface thread The background thread can report its status to a foreground thread by calling the ReportProgress method of the BackgroundWorker class The WorkerReportsProgress property indicates whether the BackgroundWorker component should raise the ProgressChanged event when the background thread calls the ReportProgress method

Change the appearance of a UI element by using triggers


A Trigger can be defined in such a way that the setting action occurs when a property is set to a specific value and reverts when the property is no longer set to that value You can use an EventTrigger to initiate an animation when an event occurs A MultiDataTrigger is used with data bound controls to manage how specific data values are displayed based on the values in multiple fields

Copyright 2009 MeasureUp.

SumITUp | A Complete Summary for Our 70-505 Practice Test

Implement an asynchronous method


With the event-based asynchronous pattern, a worker thread raises an event to signal completion of an asynchronous process - To use the pattern, you must define a CompletedEventHandler delegate The ParameterizedThreadStart delegate accepts a single Object instance as a parameter that specifies the argument to the method Threads that you create manually by instantiating an instance of the Thread class are not considered thread pool threads Calling the Invoke method of the PropertyGrid control calls the delegate passed as an argument to execute on the same thread that created the underlying window handle for the PropertyGrid control - This thread is referred to as the user interface thread The Mutex class allows you to synchronize access to resources that are shared by multiple processes The Semaphore class represents a semaphore, which allows you to synchronize access to a resource pool

Developing Windows Forms Controls


Create a composite Windows Forms control
By using an event, you can notify applications that use your control that something has happened, is happening, or is about to happen

Create a custom Windows Forms control by inheriting from the control class
Only controls that derive from Control can be displayed on forms The OnPaint method is called whenever regions of a control are invalidated

Create an extended control by inheriting from an existing Windows Forms control


When a control paints itself, the control's OnPaint method is called Calling SetStyle and passing the UserPaint flag indicates that the control paints itself rather than having the operating system perform the job The Panel control can host other controls at run time and design time - It can also be added to any form in a Windows Forms application The MaskedTextBox control uses masks to constrain the input that is supported by the control The TextBox control inherently supports auto-completion

Configuring and Deploying Applications


Configure the installation of a Windows Forms application by using ClickOnce technology
The Mage.exe tool allows you to manage a published application The MageUI.exe tool provides a graphical user interface for managing a published application

Install a Windows Presentation Foundation (WPF) browser application by using ClickOnce


A ClickOnce deployment can be installed through a link on a Web page

Copyright 2009 MeasureUp.

SumITUp | A Complete Summary for Our 70-505 Practice Test

When an application is started from a Web server, it is downloaded and installed to a temporary location - The files are deleted when the application is closed If you create a ClickOnce deployment that installs an application, the files will remain on the computer after the application is closed If a WPF application loads modules dynamically, those modules must be referenced in an application manifest so that it can find the modules at runtime

Install a Visual Studio Tools for Office (VSTO) application by using ClickOnce
Visual Studio Tools for Office system 3.0 Runtime is the runtime required by Office 2007 add-ins and document applications

Configure and work with Windows Vista User Account Control (UAC) by using ClickOnce deployments
The Standard User Analyzer is a tool that can be downloaded from the Microsoft Web site - It is used to analyze an existing application to identify problems that will occur when an application is run under a standard user account

Create a Windows Forms setup application


The Context.Parameters property is a StringDictionary instance that contains a map of parameter names to parameter values To pass data to custom actions, you must use the following format in the CustomActionData property - /name=value o If the value token represents the property value that comes from a user interface field, the Windows Installer property name that represents the value should be enclosed in square brackets o o If the value contains spaces, the value must be enclosed in quotes The name token must represent the name of the property that will be passed to the custom action o The token must begin with a forward slash

You can create a Windows Installer file that targets a specific processor platform by creating a deployment project and setting the TargetPlatform property

Set appropriate security permissions to deploy the application


You must create a Windows Installer package to install a component in the GAC A ClickOnce application can be installed by a standard user, but the deployment manifest must be updated and signed by an administrator on the server where the ClickOnce deployment is hosted A Windows Installer package can only be run by a user with Administrator permission

Configure Trusted Application deployments


When configuring an application to use ClickOnce deployment from an intranet file server, you should set the trust level to partial trust, select Local Intranet as the zone, and specify any permissions the assembly needs Signing the deployment manifest identifies the publisher of the application

Copyright 2009 MeasureUp.

SumITUp | A Complete Summary for Our 70-505 Practice Test

Configure security features in an application


Office document-level customizations require both an assembly and a document that can be executed with full trust Only components in the GAC can be shared by multiple applications - To install a component in the GAC, it must have a strong name o You give the component a strong name by identifying a version number and a name, and signing it with a certificate - By default, components in the GAC can only be run by applications that have full trust You can use declarative security on a class to limit the class to users who belong to a specific Windows group

Acronyms
Acronym CLR DOM GAC MDI UI WPF Definition Common language runtime Document Object Model Global assembly cache Multiple-document interface User interface Windows Presentation Foundation

Copyright 2009 MeasureUp.

S-ar putea să vă placă și