├── .editorconfig ├── .github ├── dependabot.yml └── workflows │ └── dotnet.yml ├── .gitignore ├── Exmaple2.0 ├── App.axaml ├── App.axaml.cs ├── Assets │ └── avalonia-logo.ico ├── Exmaple2.0.csproj ├── Program.cs ├── ViewLocator.cs ├── ViewModels │ ├── MainWindowViewModel.cs │ └── ViewModelBase.cs ├── Views │ ├── MainWindow.axaml │ └── MainWindow.axaml.cs └── app.manifest ├── Images ├── Base2.png ├── Untitled1.jpg ├── custom.png ├── customImage.png ├── jetbrains-variant-4.png ├── link.png ├── markdown.png ├── stadard.png ├── standart-messagebox.png └── window-icon.png ├── LICENSE ├── MessageBox.Avalonia.sln ├── MessageBox.Avalonia.sln.DotSettings ├── MsBox.Avalonia.Markdown ├── Controls │ └── MarkdownView.axaml ├── MsBox.Avalonia.Markdown.csproj └── icon.jpg ├── MsBox.Avalonia ├── Assets │ ├── battery.png │ ├── bluetooth.png │ ├── database.png │ ├── error.png │ ├── eye.ttf │ ├── folder.png │ ├── forbidden.png │ ├── info.png │ ├── lock.png │ ├── plus.png │ ├── question.png │ ├── setting.png │ ├── speakerless.png │ ├── speakermore.png │ ├── stop.png │ ├── stopwatch.png │ ├── success.png │ ├── warning.png │ └── wifi.png ├── AttachadProperty │ └── HyperLinkCommand.cs ├── Base │ ├── IClose.cs │ ├── ICopy.cs │ ├── IFullApi.cs │ ├── IInput.cs │ ├── IMsBox.cs │ ├── ISetCloseAction.cs │ └── ISetFullApi.cs ├── Controls │ ├── MarkdownView.axaml │ ├── MarkdownView.axaml.cs │ ├── MsBoxCustomView.axaml │ ├── MsBoxCustomView.axaml.cs │ ├── MsBoxStandardView.axaml │ └── MsBoxStandardView.axaml.cs ├── Converters │ └── ConditionalGridLengthStarConverter.cs ├── Dto │ ├── AbstractMessageBoxParams.cs │ ├── MessageBoxCustomParams.cs │ └── MessageBoxStandardParams.cs ├── Enums │ ├── ButtonEnum.cs │ ├── ButtonResult.cs │ ├── ClickEnum.cs │ └── Icon.cs ├── MessageBoxManager.cs ├── Models │ └── ButtonDefinition.cs ├── MsBox.Avalonia.csproj ├── MsBox.cs ├── ViewModels │ ├── AbstractMsBoxViewModel.cs │ ├── Commands │ │ └── RelayCommand.cs │ ├── DesignDataContexts.cs │ ├── MsBoxCustomViewModel.cs │ └── MsBoxStandardViewModel.cs ├── Windows │ ├── MsBoxWindow.axaml │ └── MsBoxWindow.axaml.cs ├── icon.jpg └── strong-key.snk ├── README.md └── XTest ├── .gitignore ├── Directory.Build.props ├── XTest.Android ├── Icon.png ├── MainActivity.cs ├── Properties │ └── AndroidManifest.xml ├── Resources │ ├── drawable │ │ └── splash_screen.xml │ ├── values-night │ │ └── colors.xml │ └── values │ │ ├── colors.xml │ │ └── styles.xml └── XTest.Android.csproj ├── XTest.Browser ├── AppBundle │ ├── Logo.svg │ ├── app.css │ ├── favicon.ico │ ├── index.html │ └── main.js ├── Program.cs ├── Properties │ └── launchSettings.json ├── XTest.Browser.csproj └── runtimeconfig.template.json ├── XTest.Desktop ├── Program.cs ├── XTest.Desktop.csproj └── app.manifest ├── XTest.iOS ├── AppDelegate.cs ├── Entitlements.plist ├── Info.plist ├── Main.cs ├── Resources │ └── LaunchScreen.xib └── XTest.iOS.csproj ├── XTest.sln └── XTest ├── App.axaml ├── App.axaml.cs ├── Assets └── avalonia-logo.ico ├── ViewLocator.cs ├── ViewModels ├── MainViewModel.cs └── ViewModelBase.cs ├── Views ├── MainView.axaml ├── MainView.axaml.cs ├── MainWindow.axaml └── MainWindow.axaml.cs └── XTest.csproj /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | # All files 4 | [*] 5 | indent_style = space 6 | 7 | # Xml files 8 | [*.xml] 9 | indent_size = 2 10 | 11 | # C# files 12 | [*.cs] 13 | 14 | #### Core EditorConfig Options #### 15 | 16 | # Indentation and spacing 17 | indent_size = 4 18 | tab_width = 4 19 | 20 | # New line preferences 21 | end_of_line = crlf 22 | insert_final_newline = false 23 | 24 | #### .NET Coding Conventions #### 25 | [*.{cs,vb}] 26 | 27 | # Organize usings 28 | dotnet_separate_import_directive_groups = true 29 | dotnet_sort_system_directives_first = true 30 | file_header_template = unset 31 | 32 | # this. and Me. preferences 33 | dotnet_style_qualification_for_event = false:silent 34 | dotnet_style_qualification_for_field = false:silent 35 | dotnet_style_qualification_for_method = false:silent 36 | dotnet_style_qualification_for_property = false:silent 37 | 38 | # Language keywords vs BCL types preferences 39 | dotnet_style_predefined_type_for_locals_parameters_members = true:silent 40 | dotnet_style_predefined_type_for_member_access = true:silent 41 | 42 | # Parentheses preferences 43 | dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent 44 | dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent 45 | dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent 46 | dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent 47 | 48 | # Modifier preferences 49 | dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent 50 | 51 | # Expression-level preferences 52 | dotnet_style_coalesce_expression = true:suggestion 53 | dotnet_style_collection_initializer = true:suggestion 54 | dotnet_style_explicit_tuple_names = true:suggestion 55 | dotnet_style_null_propagation = true:suggestion 56 | dotnet_style_object_initializer = true:suggestion 57 | dotnet_style_operator_placement_when_wrapping = beginning_of_line 58 | dotnet_style_prefer_auto_properties = true:suggestion 59 | dotnet_style_prefer_compound_assignment = true:suggestion 60 | dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion 61 | dotnet_style_prefer_conditional_expression_over_return = true:suggestion 62 | dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion 63 | dotnet_style_prefer_inferred_tuple_names = true:suggestion 64 | dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion 65 | dotnet_style_prefer_simplified_boolean_expressions = true:suggestion 66 | dotnet_style_prefer_simplified_interpolation = true:suggestion 67 | 68 | # Field preferences 69 | dotnet_style_readonly_field = true:warning 70 | 71 | # Parameter preferences 72 | dotnet_code_quality_unused_parameters = all:suggestion 73 | 74 | # Suppression preferences 75 | dotnet_remove_unnecessary_suppression_exclusions = none 76 | 77 | #### C# Coding Conventions #### 78 | [*.cs] 79 | 80 | # var preferences 81 | csharp_style_var_elsewhere = false:silent 82 | csharp_style_var_for_built_in_types = false:silent 83 | csharp_style_var_when_type_is_apparent = false:silent 84 | 85 | # Expression-bodied members 86 | csharp_style_expression_bodied_accessors = true:silent 87 | csharp_style_expression_bodied_constructors = false:silent 88 | csharp_style_expression_bodied_indexers = true:silent 89 | csharp_style_expression_bodied_lambdas = true:suggestion 90 | csharp_style_expression_bodied_local_functions = false:silent 91 | csharp_style_expression_bodied_methods = false:silent 92 | csharp_style_expression_bodied_operators = false:silent 93 | csharp_style_expression_bodied_properties = true:silent 94 | 95 | # Pattern matching preferences 96 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion 97 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion 98 | csharp_style_prefer_not_pattern = true:suggestion 99 | csharp_style_prefer_pattern_matching = true:silent 100 | csharp_style_prefer_switch_expression = true:suggestion 101 | 102 | # Null-checking preferences 103 | csharp_style_conditional_delegate_call = true:suggestion 104 | 105 | # Modifier preferences 106 | csharp_prefer_static_local_function = true:warning 107 | csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent 108 | 109 | # Code-block preferences 110 | csharp_prefer_braces = true:silent 111 | csharp_prefer_simple_using_statement = true:suggestion 112 | 113 | # Expression-level preferences 114 | csharp_prefer_simple_default_expression = true:suggestion 115 | csharp_style_deconstructed_variable_declaration = true:suggestion 116 | csharp_style_inlined_variable_declaration = true:suggestion 117 | csharp_style_pattern_local_over_anonymous_function = true:suggestion 118 | csharp_style_prefer_index_operator = true:suggestion 119 | csharp_style_prefer_range_operator = true:suggestion 120 | csharp_style_throw_expression = true:suggestion 121 | csharp_style_unused_value_assignment_preference = discard_variable:suggestion 122 | csharp_style_unused_value_expression_statement_preference = discard_variable:silent 123 | 124 | # 'using' directive preferences 125 | csharp_using_directive_placement = outside_namespace:silent 126 | 127 | #### C# Formatting Rules #### 128 | 129 | # New line preferences 130 | csharp_new_line_before_catch = true 131 | csharp_new_line_before_else = true 132 | csharp_new_line_before_finally = true 133 | csharp_new_line_before_members_in_anonymous_types = true 134 | csharp_new_line_before_members_in_object_initializers = true 135 | csharp_new_line_before_open_brace = all 136 | csharp_new_line_between_query_expression_clauses = true 137 | 138 | # Indentation preferences 139 | csharp_indent_block_contents = true 140 | csharp_indent_braces = false 141 | csharp_indent_case_contents = true 142 | csharp_indent_case_contents_when_block = true 143 | csharp_indent_labels = one_less_than_current 144 | csharp_indent_switch_labels = true 145 | 146 | # Space preferences 147 | csharp_space_after_cast = false 148 | csharp_space_after_colon_in_inheritance_clause = true 149 | csharp_space_after_comma = true 150 | csharp_space_after_dot = false 151 | csharp_space_after_keywords_in_control_flow_statements = true 152 | csharp_space_after_semicolon_in_for_statement = true 153 | csharp_space_around_binary_operators = before_and_after 154 | csharp_space_around_declaration_statements = false 155 | csharp_space_before_colon_in_inheritance_clause = true 156 | csharp_space_before_comma = false 157 | csharp_space_before_dot = false 158 | csharp_space_before_open_square_brackets = false 159 | csharp_space_before_semicolon_in_for_statement = false 160 | csharp_space_between_empty_square_brackets = false 161 | csharp_space_between_method_call_empty_parameter_list_parentheses = false 162 | csharp_space_between_method_call_name_and_opening_parenthesis = false 163 | csharp_space_between_method_call_parameter_list_parentheses = false 164 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false 165 | csharp_space_between_method_declaration_name_and_open_parenthesis = false 166 | csharp_space_between_method_declaration_parameter_list_parentheses = false 167 | csharp_space_between_parentheses = false 168 | csharp_space_between_square_brackets = false 169 | 170 | # Wrapping preferences 171 | csharp_preserve_single_line_blocks = true 172 | csharp_preserve_single_line_statements = true 173 | csharp_style_namespace_declarations = block_scoped:silent 174 | csharp_style_prefer_method_group_conversion = true:silent 175 | csharp_style_prefer_top_level_statements = true:silent 176 | csharp_style_prefer_primary_constructors = true:suggestion 177 | csharp_style_prefer_null_check_over_type_check = true:suggestion 178 | csharp_style_prefer_local_over_anonymous_function = true:suggestion 179 | csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion 180 | csharp_style_prefer_tuple_swap = true:suggestion 181 | csharp_style_prefer_utf8_string_literals = true:suggestion 182 | 183 | #### Naming styles #### 184 | [*.{cs,vb}] 185 | 186 | # Naming rules 187 | 188 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion 189 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces 190 | dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase 191 | 192 | dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = suggestion 193 | dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces 194 | dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase 195 | 196 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion 197 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters 198 | dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase 199 | 200 | dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion 201 | dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods 202 | dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase 203 | 204 | dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion 205 | dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties 206 | dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase 207 | 208 | dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion 209 | dotnet_naming_rule.events_should_be_pascalcase.symbols = events 210 | dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase 211 | 212 | dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion 213 | dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables 214 | dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase 215 | 216 | dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion 217 | dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants 218 | dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase 219 | 220 | dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion 221 | dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters 222 | dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase 223 | 224 | dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion 225 | dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields 226 | dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase 227 | 228 | dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion 229 | dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields 230 | dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase 231 | 232 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion 233 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields 234 | dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase 235 | 236 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion 237 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields 238 | dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase 239 | 240 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion 241 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields 242 | dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase 243 | 244 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion 245 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields 246 | dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase 247 | 248 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion 249 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields 250 | dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase 251 | 252 | dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion 253 | dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums 254 | dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase 255 | 256 | dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion 257 | dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions 258 | dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase 259 | 260 | dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion 261 | dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members 262 | dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase 263 | 264 | # Symbol specifications 265 | 266 | dotnet_naming_symbols.interfaces.applicable_kinds = interface 267 | dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 268 | dotnet_naming_symbols.interfaces.required_modifiers = 269 | 270 | dotnet_naming_symbols.enums.applicable_kinds = enum 271 | dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 272 | dotnet_naming_symbols.enums.required_modifiers = 273 | 274 | dotnet_naming_symbols.events.applicable_kinds = event 275 | dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 276 | dotnet_naming_symbols.events.required_modifiers = 277 | 278 | dotnet_naming_symbols.methods.applicable_kinds = method 279 | dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 280 | dotnet_naming_symbols.methods.required_modifiers = 281 | 282 | dotnet_naming_symbols.properties.applicable_kinds = property 283 | dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 284 | dotnet_naming_symbols.properties.required_modifiers = 285 | 286 | dotnet_naming_symbols.public_fields.applicable_kinds = field 287 | dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal 288 | dotnet_naming_symbols.public_fields.required_modifiers = 289 | 290 | dotnet_naming_symbols.private_fields.applicable_kinds = field 291 | dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 292 | dotnet_naming_symbols.private_fields.required_modifiers = 293 | 294 | dotnet_naming_symbols.private_static_fields.applicable_kinds = field 295 | dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 296 | dotnet_naming_symbols.private_static_fields.required_modifiers = static 297 | 298 | dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum 299 | dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 300 | dotnet_naming_symbols.types_and_namespaces.required_modifiers = 301 | 302 | dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method 303 | dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 304 | dotnet_naming_symbols.non_field_members.required_modifiers = 305 | 306 | dotnet_naming_symbols.type_parameters.applicable_kinds = namespace 307 | dotnet_naming_symbols.type_parameters.applicable_accessibilities = * 308 | dotnet_naming_symbols.type_parameters.required_modifiers = 309 | 310 | dotnet_naming_symbols.private_constant_fields.applicable_kinds = field 311 | dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 312 | dotnet_naming_symbols.private_constant_fields.required_modifiers = const 313 | 314 | dotnet_naming_symbols.local_variables.applicable_kinds = local 315 | dotnet_naming_symbols.local_variables.applicable_accessibilities = local 316 | dotnet_naming_symbols.local_variables.required_modifiers = 317 | 318 | dotnet_naming_symbols.local_constants.applicable_kinds = local 319 | dotnet_naming_symbols.local_constants.applicable_accessibilities = local 320 | dotnet_naming_symbols.local_constants.required_modifiers = const 321 | 322 | dotnet_naming_symbols.parameters.applicable_kinds = parameter 323 | dotnet_naming_symbols.parameters.applicable_accessibilities = * 324 | dotnet_naming_symbols.parameters.required_modifiers = 325 | 326 | dotnet_naming_symbols.public_constant_fields.applicable_kinds = field 327 | dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal 328 | dotnet_naming_symbols.public_constant_fields.required_modifiers = const 329 | 330 | dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field 331 | dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal 332 | dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static 333 | 334 | dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field 335 | dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected 336 | dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static 337 | 338 | dotnet_naming_symbols.local_functions.applicable_kinds = local_function 339 | dotnet_naming_symbols.local_functions.applicable_accessibilities = * 340 | dotnet_naming_symbols.local_functions.required_modifiers = 341 | 342 | # Naming styles 343 | 344 | dotnet_naming_style.pascalcase.required_prefix = 345 | dotnet_naming_style.pascalcase.required_suffix = 346 | dotnet_naming_style.pascalcase.word_separator = 347 | dotnet_naming_style.pascalcase.capitalization = pascal_case 348 | 349 | dotnet_naming_style.ipascalcase.required_prefix = I 350 | dotnet_naming_style.ipascalcase.required_suffix = 351 | dotnet_naming_style.ipascalcase.word_separator = 352 | dotnet_naming_style.ipascalcase.capitalization = pascal_case 353 | 354 | dotnet_naming_style.tpascalcase.required_prefix = T 355 | dotnet_naming_style.tpascalcase.required_suffix = 356 | dotnet_naming_style.tpascalcase.word_separator = 357 | dotnet_naming_style.tpascalcase.capitalization = pascal_case 358 | 359 | dotnet_naming_style._camelcase.required_prefix = _ 360 | dotnet_naming_style._camelcase.required_suffix = 361 | dotnet_naming_style._camelcase.word_separator = 362 | dotnet_naming_style._camelcase.capitalization = camel_case 363 | 364 | dotnet_naming_style.camelcase.required_prefix = 365 | dotnet_naming_style.camelcase.required_suffix = 366 | dotnet_naming_style.camelcase.word_separator = 367 | dotnet_naming_style.camelcase.capitalization = camel_case 368 | 369 | dotnet_naming_style.s_camelcase.required_prefix = s_ 370 | dotnet_naming_style.s_camelcase.required_suffix = 371 | dotnet_naming_style.s_camelcase.word_separator = 372 | dotnet_naming_style.s_camelcase.capitalization = camel_case 373 | dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion 374 | dotnet_style_namespace_match_folder = true:suggestion 375 | tab_width = 4 376 | indent_size = 4 377 | end_of_line = crlf 378 | 379 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Enable version updates for nuget 4 | - package-ecosystem: "nuget" 5 | # Look for NuGet dependency info from the `root` directory 6 | directory: "/" 7 | schedule: 8 | interval: "weekly" 9 | 10 | - package-ecosystem: "github-actions" 11 | # Workflow files stored in the 12 | # default location of `.github/workflows` 13 | directory: "/" 14 | schedule: 15 | interval: "weekly" 16 | -------------------------------------------------------------------------------- /.github/workflows/dotnet.yml: -------------------------------------------------------------------------------- 1 | 2 | name: .NET Core 3 | 4 | on: 5 | push: 6 | branches-ignore: 7 | - 'master' 8 | pull_request: 9 | branches: 10 | - '**:**' 11 | 12 | 13 | jobs: 14 | build: 15 | 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - uses: actions/checkout@v2 20 | - name: Setup .NET 21 | uses: actions/setup-dotnet@v1 22 | with: 23 | dotnet-version: 6.0.x 24 | - name: Restore dependencies 25 | run: dotnet restore 26 | - name: Build 27 | run: dotnet build --no-restore 28 | - name: Test 29 | run: dotnet test --no-build --verbosity normal 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | /.idea 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # StyleCop 66 | StyleCopReport.xml 67 | 68 | # Files built by Visual Studio 69 | *_i.c 70 | *_p.c 71 | *_h.h 72 | *.ilk 73 | *.meta 74 | *.obj 75 | *.iobj 76 | *.pch 77 | *.pdb 78 | *.ipdb 79 | *.pgc 80 | *.pgd 81 | *.rsp 82 | *.sbr 83 | *.tlb 84 | *.tli 85 | *.tlh 86 | *.tmp 87 | *.tmp_proj 88 | *_wpftmp.csproj 89 | *.log 90 | *.vspscc 91 | *.vssscc 92 | .builds 93 | *.pidb 94 | *.svclog 95 | *.scc 96 | 97 | # Chutzpah Test files 98 | _Chutzpah* 99 | 100 | # Visual C++ cache files 101 | ipch/ 102 | *.aps 103 | *.ncb 104 | *.opendb 105 | *.opensdf 106 | *.sdf 107 | *.cachefile 108 | *.VC.db 109 | *.VC.VC.opendb 110 | 111 | # Visual Studio profiler 112 | *.psess 113 | *.vsp 114 | *.vspx 115 | *.sap 116 | 117 | # Visual Studio Trace Files 118 | *.e2e 119 | 120 | # TFS 2012 Local Workspace 121 | $tf/ 122 | 123 | # Guidance Automation Toolkit 124 | *.gpState 125 | 126 | # ReSharper is a .NET coding add-in 127 | _ReSharper*/ 128 | *.[Rr]e[Ss]harper 129 | *.DotSettings.user 130 | 131 | # JustCode is a .NET coding add-in 132 | .JustCode 133 | 134 | # TeamCity is a build add-in 135 | _TeamCity* 136 | 137 | # DotCover is a Code Coverage Tool 138 | *.dotCover 139 | 140 | # AxoCover is a Code Coverage Tool 141 | .axoCover/* 142 | !.axoCover/settings.json 143 | 144 | # Visual Studio code coverage results 145 | *.coverage 146 | *.coveragexml 147 | 148 | # NCrunch 149 | _NCrunch_* 150 | .*crunch*.local.xml 151 | nCrunchTemp_* 152 | 153 | # MightyMoose 154 | *.mm.* 155 | AutoTest.Net/ 156 | 157 | # Web workbench (sass) 158 | .sass-cache/ 159 | 160 | # Installshield output folder 161 | [Ee]xpress/ 162 | 163 | # DocProject is a documentation generator add-in 164 | DocProject/buildhelp/ 165 | DocProject/Help/*.HxT 166 | DocProject/Help/*.HxC 167 | DocProject/Help/*.hhc 168 | DocProject/Help/*.hhk 169 | DocProject/Help/*.hhp 170 | DocProject/Help/Html2 171 | DocProject/Help/html 172 | 173 | # Click-Once directory 174 | publish/ 175 | 176 | # Publish Web Output 177 | *.[Pp]ublish.xml 178 | *.azurePubxml 179 | # Note: Comment the next line if you want to checkin your web deploy settings, 180 | # but database connection strings (with potential passwords) will be unencrypted 181 | *.pubxml 182 | *.publishproj 183 | 184 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 185 | # checkin your Azure Web App publish settings, but sensitive information contained 186 | # in these scripts will be unencrypted 187 | PublishScripts/ 188 | 189 | # NuGet Packages 190 | *.nupkg 191 | # NuGet Symbol Packages 192 | *.snupkg 193 | # The packages folder can be ignored because of Package Restore 194 | **/[Pp]ackages/* 195 | # except build/, which is used as an MSBuild target. 196 | !**/[Pp]ackages/build/ 197 | # Uncomment if necessary however generally it will be regenerated when needed 198 | #!**/[Pp]ackages/repositories.config 199 | # NuGet v3's project.json files produces more ignorable files 200 | *.nuget.props 201 | *.nuget.targets 202 | 203 | # Microsoft Azure Build Output 204 | csx/ 205 | *.build.csdef 206 | 207 | # Microsoft Azure Emulator 208 | ecf/ 209 | rcf/ 210 | 211 | # Windows Store app package directories and files 212 | AppPackages/ 213 | BundleArtifacts/ 214 | Package.StoreAssociation.xml 215 | _pkginfo.txt 216 | *.appx 217 | *.appxbundle 218 | *.appxupload 219 | 220 | # Visual Studio cache files 221 | # files ending in .cache can be ignored 222 | *.[Cc]ache 223 | # but keep track of directories ending in .cache 224 | !?*.[Cc]ache/ 225 | 226 | # Others 227 | ClientBin/ 228 | ~$* 229 | *~ 230 | *.dbmdl 231 | *.dbproj.schemaview 232 | *.jfm 233 | *.pfx 234 | *.publishsettings 235 | orleans.codegen.cs 236 | 237 | # Including strong name files can present a security risk 238 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 239 | #*.snk 240 | 241 | # Since there are multiple workflows, uncomment next line to ignore bower_components 242 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 243 | #bower_components/ 244 | 245 | # RIA/Silverlight projects 246 | Generated_Code/ 247 | 248 | # Backup & report files from converting an old project file 249 | # to a newer Visual Studio version. Backup files are not needed, 250 | # because we have git ;-) 251 | _UpgradeReport_Files/ 252 | Backup*/ 253 | UpgradeLog*.XML 254 | UpgradeLog*.htm 255 | ServiceFabricBackup/ 256 | *.rptproj.bak 257 | 258 | # SQL Server files 259 | *.mdf 260 | *.ldf 261 | *.ndf 262 | 263 | # Business Intelligence projects 264 | *.rdl.data 265 | *.bim.layout 266 | *.bim_*.settings 267 | *.rptproj.rsuser 268 | *- [Bb]ackup.rdl 269 | *- [Bb]ackup ([0-9]).rdl 270 | *- [Bb]ackup ([0-9][0-9]).rdl 271 | 272 | # Microsoft Fakes 273 | FakesAssemblies/ 274 | 275 | # GhostDoc plugin setting file 276 | *.GhostDoc.xml 277 | 278 | # Node.js Tools for Visual Studio 279 | .ntvs_analysis.dat 280 | node_modules/ 281 | 282 | # Visual Studio 6 build log 283 | *.plg 284 | 285 | # Visual Studio 6 workspace options file 286 | *.opt 287 | 288 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 289 | *.vbw 290 | 291 | # Visual Studio LightSwitch build output 292 | **/*.HTMLClient/GeneratedArtifacts 293 | **/*.DesktopClient/GeneratedArtifacts 294 | **/*.DesktopClient/ModelManifest.xml 295 | **/*.Server/GeneratedArtifacts 296 | **/*.Server/ModelManifest.xml 297 | _Pvt_Extensions 298 | 299 | # Paket dependency manager 300 | .paket/paket.exe 301 | paket-files/ 302 | 303 | # FAKE - F# Make 304 | .fake/ 305 | 306 | # CodeRush personal settings 307 | .cr/personal 308 | 309 | # Python Tools for Visual Studio (PTVS) 310 | __pycache__/ 311 | *.pyc 312 | 313 | # Cake - Uncomment if you are using it 314 | # tools/** 315 | # !tools/packages.config 316 | 317 | # Tabs Studio 318 | *.tss 319 | 320 | # Telerik's JustMock configuration file 321 | *.jmconfig 322 | 323 | # BizTalk build output 324 | *.btp.cs 325 | *.btm.cs 326 | *.odx.cs 327 | *.xsd.cs 328 | 329 | # OpenCover UI analysis results 330 | OpenCover/ 331 | 332 | # Azure Stream Analytics local run output 333 | ASALocalRun/ 334 | 335 | # MSBuild Binary and Structured Log 336 | *.binlog 337 | 338 | # NVidia Nsight GPU debugger configuration file 339 | *.nvuser 340 | 341 | # MFractors (Xamarin productivity tool) working folder 342 | .mfractor/ 343 | 344 | # Local History for Visual Studio 345 | .localhistory/ 346 | 347 | # BeatPulse healthcheck temp database 348 | healthchecksdb 349 | 350 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 351 | MigrationBackup/ 352 | 353 | # Ionide (cross platform F# VS Code tools) working folder 354 | .ionide/ 355 | 356 | #Ignore idea files 357 | .idea/ 358 | #Ignore special 359 | .directory -------------------------------------------------------------------------------- /Exmaple2.0/App.axaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Exmaple2.0/App.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls.ApplicationLifetimes; 3 | using Avalonia.Markup.Xaml; 4 | 5 | using Exmaple2._0.ViewModels; 6 | using Exmaple2._0.Views; 7 | 8 | namespace Exmaple2._0; 9 | 10 | public partial class App : Application 11 | { 12 | public override void Initialize() 13 | { 14 | AvaloniaXamlLoader.Load(this); 15 | } 16 | 17 | public override void OnFrameworkInitializationCompleted() 18 | { 19 | if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) 20 | { 21 | desktop.MainWindow = new MainWindow 22 | { 23 | DataContext = new MainWindowViewModel(), 24 | }; 25 | } 26 | 27 | base.OnFrameworkInitializationCompleted(); 28 | } 29 | } -------------------------------------------------------------------------------- /Exmaple2.0/Assets/avalonia-logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AvaloniaCommunity/MessageBox.Avalonia/205196634f30a946073544a48a6757c2a525c6e1/Exmaple2.0/Assets/avalonia-logo.ico -------------------------------------------------------------------------------- /Exmaple2.0/Exmaple2.0.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | WinExe 4 | net8.0 5 | enable 6 | enable 7 | true 8 | app.manifest 9 | true 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | Always 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Exmaple2.0/Program.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | 3 | namespace Exmaple2._0; 4 | 5 | class Program 6 | { 7 | // Initialization code. Don't use any Avalonia, third-party APIs or any 8 | // SynchronizationContext-reliant code before AppMain is called: things aren't initialized 9 | // yet and stuff might break. 10 | [STAThread] 11 | public static void Main(string[] args) => BuildAvaloniaApp() 12 | .StartWithClassicDesktopLifetime(args); 13 | 14 | // Avalonia configuration, don't remove; also used by visual designer. 15 | public static AppBuilder BuildAvaloniaApp() 16 | => AppBuilder.Configure() 17 | .UsePlatformDetect() 18 | .LogToTrace(); 19 | } -------------------------------------------------------------------------------- /Exmaple2.0/ViewLocator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia.Controls; 3 | using Avalonia.Controls.Templates; 4 | using Exmaple2._0.ViewModels; 5 | 6 | namespace Exmaple2._0; 7 | 8 | public class ViewLocator : IDataTemplate 9 | { 10 | public Control Build(object data) 11 | { 12 | var name = data.GetType().FullName!.Replace("ViewModel", "View"); 13 | var type = Type.GetType(name); 14 | 15 | if (type != null) 16 | { 17 | return (Control)Activator.CreateInstance(type)!; 18 | } 19 | 20 | return new TextBlock { Text = "Not Found: " + name }; 21 | } 22 | 23 | public bool Match(object data) 24 | { 25 | return data is ViewModelBase; 26 | } 27 | } -------------------------------------------------------------------------------- /Exmaple2.0/ViewModels/MainWindowViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Exmaple2._0.ViewModels; 2 | 3 | public class MainWindowViewModel : ViewModelBase 4 | { 5 | public string Greeting => "Welcome to Avalonia!"; 6 | } -------------------------------------------------------------------------------- /Exmaple2.0/ViewModels/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | 3 | namespace Exmaple2._0.ViewModels; 4 | 5 | public class ViewModelBase : ObservableObject 6 | { 7 | } -------------------------------------------------------------------------------- /Exmaple2.0/Views/MainWindow.axaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 25 | 26 | 27 | 28 |