1 / 14

WPF - Homework

WPF - Homework. Doncho Minkov. Telerik School Academy. academy.telerik.com. Technical Trainer. www.minkov.it. Exercises. Create the following: *Note : Don't use Grid for everything. Exercises (2). Create the following: *Note : Don't use Grid for everything. Exercises (3).

bazyli
Download Presentation

WPF - Homework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. WPF - Homework Doncho Minkov Telerik School Academy academy.telerik.com Technical Trainer www.minkov.it

  2. Exercises • Create the following: • *Note: Don't use Grid for everything

  3. Exercises (2) • Create the following: • *Note: Don't use Grid for everything

  4. Exercises (3) • Using Tabs create the previous XAMLs in tab controls • Add GridSplitterwhenever you used Grid as a panel

  5. Exercises • Write a program that show the simple window with one TextBox. Add text to the TextBox. If you select some text in the TextBox – display the current selection information. • Write a program with a Button and a Label. The label should show the number of clicks on the button. • Write a program that visualize which one of the items collection are checked. • Write a program that shows a ComboBox with various elements added to its Items. For example – add text, ellipse and picture.

  6. Exercises (2) • Write a program that showsListView withcolumns that contain controls such as checkboxes and text boxes. The name of the columns are ID, Enabled, Value. • Write a text editing user control that is like simple WordPad. It should have at least a TextWrap property, Scrollbar, Buttonsfor Save and Load, ComboBoxesfor choosing FontFamilyand FontSize.

  7. Exercises (3) • Implement a specialized editor of text document libraries. A library is a number of text documents, organized as a tree in folders. In a folder there can be documents and other folders (as in Windows). Every document is some text with formatting. The editor must be able to create libraries, to open/save libraries, to read/write libraries from/to XML files. When a library is open the editor can edit the documents inside (changing the text and the formatting) and can create/delete/rename folders and documents. Use a TreeView for the folder tree and RichTextBox for the active document.

  8. Exercises (4) The editor should have a main menu, 2 context menus (for the folder tree and for the active document area), 3 tool bars (to open/save a library, to facilitate working with the folder tree and one for the active document), a status bar and appropriate shortcuts for the most frequently used

  9. Exercises • Write a program that visualize this figure. Use only rectangles and RenderTransform. • Draw the rectangles from the previous exercise with rounded corners. • Write a WPF program that visualize the figure below. Use Polyline and Polygon and FillRule property. • In the demo "Arc Segment" add rotation of 45 degrees (rotating the ellipses before slicing them). • Draw few national flags (e.g. Bulgarian, German, …). Make an animation that transits from one flag to another by changing the opacity of the flags.

  10. Exercises (2) • Write a WPF program that visualize a LinearGradientBrush with multiple colors (use Offset property). • Use TransformGroup to apply a ScaleTransform and a RotateTransform to the RenderTransform property of a TextBlock. • Implement Storyboard animation that moves a large blue rectangle from left to right and back. Add a counterclockwise rotation to the animation. Finally add a color-changing animation from blue to yellow.

  11. Exercises (3) • Implement a star field simulation in WPF. The sky should be a Canvas panel with black background. The stars should be light blue circles with different size and transparency. All stars should move from top to bottom with different speed. Larger stars move faster and are less transparent. • Add a space ship at the bottom of the screen. • Make the ship move left or right by keyboard keys.

  12. Exercises • Write a program to manage a simple system with information about towns and countries. Each country is described by name, language, national flag and list of towns. Each town is described by name, population and country. You should create navigation over the towns and countries. Enable editing the information about them. Don't use listcontrols but only text boxesand simple binding • Rewrite the previous exercise using list controls.

  13. Exercises (2) • Create a database with two tables – Categories and Products. Each category has category name. Each product has category, model number, model name unit cost, and description. Consider the simple window look like the screenshot below: • Design a form to view products by ID and bind all controls to their relevant columns from the database tables.

  14. Exercises (3) • Using complex data binding create a system, resembling the system from the first exercise (towns and countries). Add to the system a set of continents – each country is in one of them. Display data and enable navigation. Load and save the data in a XML file. Add sorting, filtering and grouping functions. Use master-details bindings. • Rewrite the previous exercise to use database and LINQ-to-SQL. Ensure all entities can be added / edited / deleted (continents, countries and towns).

More Related