Replies: 6 comments
-
It's called partial classes and you can already use them today. |
Beta Was this translation helpful? Give feedback.
-
I totally get that, but I was asking if we could create like a nested class. Like how xaml and the code behind creates together |
Beta Was this translation helpful? Give feedback.
-
It's also called "partial classes". |
Beta Was this translation helpful? Give feedback.
-
okay. did not know that. |
Beta Was this translation helpful? Give feedback.
-
If the "nested" you mentioned is the file structure shown below: It is related to the configuration in the <Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile> |
Beta Was this translation helpful? Give feedback.
-
You can also use a folder with two files. |
Beta Was this translation helpful? Give feedback.
-
I have been lately spending a lot of time exploring MVU architecture and Comet. Its pretty cool and fun to work with. One thing that really bothers me in almost all MVU style coding is how much code that goes into a single class file.
Can we have nested classes where in one we draw the UI, and in the other we write the logic. More like Xaml and code-behind. Infact also blazor has a better approach
Reference: https://www.telerik.com/blogs/using-a-code-behind-approach-to-blazor-components
Beta Was this translation helpful? Give feedback.
All reactions