-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1772 from riganti/markup-properties-same-name-error
Properties with the same name defined by `@property` directive
- Loading branch information
Showing
10 changed files
with
120 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/Samples/Common/ViewModels/Errors/MarkupControlPropertiesSameNameWithBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using DotVVM.Framework.Binding; | ||
using DotVVM.Framework.Controls; | ||
|
||
namespace DotVVM.Samples.Common.ViewModels.Errors | ||
{ | ||
public class MarkupControlPropertiesSameNameWithBase : DotvvmMarkupControl | ||
{ | ||
public string MyProperty | ||
{ | ||
get { return (string)GetValue(MyPropertyProperty); } | ||
set { SetValue(MyPropertyProperty, value); } | ||
} | ||
public static readonly DotvvmProperty MyPropertyProperty | ||
= DotvvmProperty.Register<string, MarkupControlPropertiesSameNameWithBase>(c => c.MyProperty, null); | ||
|
||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/Samples/Common/Views/Errors/MarkupControlPropertiesSameName.dotcontrol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@viewModel object | ||
|
||
@property int MyProperty | ||
@property bool MyProperty | ||
|
||
{{value: _control.MyProperty}} |
15 changes: 15 additions & 0 deletions
15
src/Samples/Common/Views/Errors/MarkupControlPropertiesSameName.dothtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@viewModel object | ||
|
||
<!DOCTYPE html> | ||
|
||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title></title> | ||
</head> | ||
<body> | ||
<sample:MarkupControlPropertiesSameName MyProperty="1" /> | ||
</body> | ||
</html> | ||
|
||
|
6 changes: 6 additions & 0 deletions
6
src/Samples/Common/Views/Errors/MarkupControlPropertiesSameNameWithBase.dotcontrol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@viewModel object | ||
@baseType DotVVM.Samples.Common.ViewModels.Errors.MarkupControlPropertiesSameNameWithBase | ||
|
||
@property bool MyProperty | ||
|
||
{{value: _control.MyProperty}} |
15 changes: 15 additions & 0 deletions
15
src/Samples/Common/Views/Errors/MarkupControlPropertiesSameNameWithBase.dothtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@viewModel object | ||
|
||
<!DOCTYPE html> | ||
|
||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title></title> | ||
</head> | ||
<body> | ||
<sample:MarkupControlPropertiesSameNameWithBase MyProperty="1" /> | ||
</body> | ||
</html> | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters