1. Create a WinForm project. A WinForm Form1 is generated by default.
2. Reference-> Add reference-> browse-> weiFenLuo. winFormsUI. Docking. dll.
3. Form attribute IsMdiContainer: True.
4. Right-click the Toolkit and choose items>. net components> browse> weiFenLuo. winFormsUI. Docking. dll> dockPanel in the Toolkit.
5. Drag the dockPanel to form Form1 and set the Dock attribute,
The Dock is Fill, D
WPF Learning Series games-select a picture to make a 9-cell puzzle and a wpf palace Tile
I want to learn about a puzzle project today.
The goal is to input an image, divide it into nine parts, remove one, and click the mouse to complete the puzzle.
The source file structure is simple.
Step 1: Create a project
There is nothing to say in this step. Creating a new project is the same as the source file structure.
Step 2: page layout (. xaml file)
View the source file
The control has three
Online demo : http://v.youku.com/v_show/id_XNzA5NDk2Mjcy.htmlClear version video + code download : Http://115.com/lb/5lbeer0m9ladFirst, Brief introductionThis article gives a preliminary overview of the WPF layout controls and demonstrates the grid, StackPanel, Canvas, DockPanel, and WrapPanel five layout controls respectively.The main contents include:1. The way and relationship of UI layout.2, the layout concept of WPF.3. Overview and presentation o
C # code:RelativeSource rs = new RelativeSource ();Rs. Ancestorlevel = 2;Rs. Ancestortype = typeof (DockPanel);Binding binding = new binding ("Name") {RelativeSource = rs};This.textBox1.SetBinding (textbox.textproperty, binding);or set in XAML:text= "{Binding relativesource={relativesource ancestortype={x:type DockPanel}, ancestorlevel=2}, Path=name}"If the textbox needs to associate its own name property,
.
xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml"
title= "layout test" height= "width=" 525 ">
--
"
"
"
2,wrappanel: Places elements in a series of lines that can be wrapped, and horizontally, the WrapPa
So far, we've only discussed how to bind and display a single collection. At some point, the collection that you want to bind contains other collections. The Hierarchicaldatatemplate class is dedicated to the HeaderedItemsControl type to display such data.Example DemoIn the following example, Listleaguelist is a list of league objects. Each league object has a collection of Name and Division objects. Each division has a collection of name and team objects, and each team object has a name.Windowx
Learn a puzzle project today.The goal is to pass in a picture, then divide it into 9 parts, remove one copy, and click on the mouse to do the puzzle.The source file structure is simpleFirst step, new projectThis step is nothing to say, the new project is the same as the source file structureSecond step, page layout (. xaml file)Look at the source fileThe DockPanel control has a grid button of three and then sets the grid to have three columns and thre
The layout control "weifenluo. winformsui. Docking" is a great open-source control that can save custom la s as XML files and load xml configuration files!
Mark first, and try again later!
(1): weifenluo. winformsui. Docking learning. Http://blog.csdn.net/gaoyunpeng/article/details/3873217
(2): weifenluo. winformsui. Docking automatically saves the interface layout! Http://www.cnblogs.com/zcshan/archive/2010/09/29/WeifenLuo.html
(3): Open Source component
code by themselves. RSS bandit [RSS and RDF tools] RSS bandit is an open-source RSS reader developed by C #. It has built-in multi-country languages and supports atom 1.0 and various other RSS feed formats. It features a beautiful screen, paging browsing, and high flexibility in software details. Its operation screen is intuitive and easy to understand. It has a good command mode and listviewex for users to quickly get started. Dockpanel suite [Other
understand. It has a good Command mode and ListViewEx for users to quickly get started.13. DockPanel Suite[Other C # Open-source projects]DockPanel Suite is an open-source docking class library for. Net Windows Forms development environments. It simulates the effects of Visual Studio. Net.14th. NPlot[Chart creation]NPlot is. NET open source chart class library. it is commendable that the API design is eleg
When I saw my colleagues using this component, it worked very well. I also wanted to learn and apply it to other projects in the future.
Reference Method:
1. Create a winform project. A winform form is generated by default.
2. Reference-> Add reference-> browse-> weifenluo. winformsui. Docking. dll.
3. Form attribute ismdicontainer: True.
4. Right-click the Toolkit and choose items>. NET components> browse> weifenluo. winformsui. Docking. dll> dockpanel
Datatemplate is what we call a data template. It is mainly used for data presentation, for example, what data is put in your list control and how to typeset the data, whether it is horizontal or vertical. Most controls in the itemscontrol and Treeview classes are used to bind data. They only present data content without affecting the appearance.
The usage of datatemplate is simple as follows (note that most of the internal elements of DT are bound to the background.CodeData)
Itemscontr
Next, go to the WPF Study Notes (data binding article 2 ). Bindvalidation
This example demonstrates:
How to Use the error template;
Display error messages using styles;
How to perform a callback when an exception occurs during verification;
First, you can see that custom error templates are used in XAML. The error templates are specified in the following way:
Textbox
Name
= "Textbox1"
Validation. errortemplate
= "{Staticresource validationtemplate }"
Style
=
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.