|
|
4 years ago | |
|---|---|---|
| LICENSE | 4 years ago | |
| README.md | 4 years ago |
System.XamlWindowsBasePresentationCorePresentationFramework
Property
public string Email { get; set; }
Get Set Property
private string _email;
public string Email
{
get { return _email; }
set { _email = value; }
}
Be sure to name the private access restrictor for the variable.
Observable Property
private string _email;
public string Email
{
get { return _email; }
set { _email = value; OnPropertyChanged(); }
}
Do not recommended to use .base for prefixes.
:x: base.OnPropertyChanged(); :heavy_check_mark: OnPropertyChanged();
Property with method in setter
private string _email;
public string Email
{
get { return _email; }
set { _email = value; OnPropertyChanged(); EmailChanged(value); }
}
#region Email
private string _email;
public string Email
{
get { return _email; }
set { _email = value; OnPropertyChanged(); EmailChanged(value); }
}
#endregion
Errors in the Try Catch area are not reflected in the program's operating cycle, which can cause application flow problems. To avoid this, it is not recommended to use Try Catch from the development stage.
Especially, WPF applications that maintain organic flow to .Xaml and .cs and Resource areas have an advantage in not using Try Catch from the development stage.
It is recommended that you use a combination of While statements to implement code that induces repetition of the Try Catch area and allows the user to control it.
When you need to check the success of the action through Try Catch.
Local File AccessCrawlingAPIExternal Connectionxmlns:local<UserControl x:Class="TestProject.Views.TestUserControl"
xmlns:local="clr-namespace:TestProject.Views;assembly=TestProject">
...
</UserControl>
Check the location of the style resource in use and make sure it is properly declared in App.xaml.
Create styles of all controls to match each name rule.
x:NameDiscard declared reckless name properties for access, such as .cs in View or ViewModel, and find a way to bypass them.
using:point_right: Why we should remove unused using? (TBD...)
Resource Rule is so important in WPF programs that you have to put more effort into than the program's UI design. Therefore, we would like to provide a guide to the main resources used by WPF in as much detail as possible.
Managing the resource system in a project is very complex and difficult. So, it is very important to abide by strict and strong naming rules from start to finish, and it requires continued patience.
Temporarily creating resource without rules is a very bad way to develop them. This is because unmanaged resources accumulate, greatly hindering the readability and functional scalability of all program logic. Also, disorderly resources will continue to torment developers until the end of the program's life cycle. Therefore, it is important to make and maintain rules even if it is annoying at the time.
Design
If WPF properties are applied directly from the screen under development, source code readability, simplicity and quality can no longer be expected. Therefore, style rules and names should be intuitive and designed to infer functions and intentions.
| Control | Naming | Namespace | Inheritance Flow |
|---|---|---|---|
| Button | BTN | System.Windows.Controls | Button > ButtonBase > ContentControl > Control > FrameworkElement > UIElement > Visual > DependencyObject |
| ToggleButton | TGL | System.Windows.Controls.Primitives | ToggleButton > ButtonBase > ContentControl > Control > FrameworkElement > UIElement > Visual > DependencyObject |
| RadioButton | RDO | System.Windows.Controls | RadioButton > ToggleButton > ButtonBase > ContentControl > Control > FrameworkElement > UIElement > Visual > DependencyObject |
| CheckBox | CHB | System.Windows.Controls | CheckBox > ToggleButton > ButtonBase > ContentControl > Control > FrameworkElement > UIElement > Visual > DependencyObject |
| Control | Naming | Namespace | Inheritance Flow |
|---|---|---|---|
| TextBox | TXT | System.Windows.Controls | TextBox > TextBoxBase > Control > FrameworkElement > UIElement > Visual > DependencyObject |
| Control | Naming | Namespace, Inheritance Flow |
|---|---|---|
| TextBlock | TXB | :black_medium_small_square: System.Windows.Controls :white_medium_small_square: TextBlock > FrameworkElement > UIElement > Visual > DependencyObject |
| Control | Naming | Namespace | Inheritance Flow |
|---|---|---|---|
| ListBox | LBX | System.Windows.Controls | ListBox > Selector > ItemsControl > Control > FrameworkElement > UIElement > Visual > DependencyObject |
| TreeView | TRV | System.Windows.Controls | TreeView > ItemsControl > Control > FrameworkElement > UIElement > Visual > DependencyObject |