-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to bind a TabControl from within another TabControl? #274
Comments
Your ZIP worked perfectly. Great job! :) And it is a good thing too, because there was a lot in your code that you didn't share above. I have several things to tell you. First, a disclaimer. I still don't know exactly what you are trying to do. However, by looking at your code (which I finally have!) and reading your above comment, I think I have a good idea. I could have misunderstood something though, so please correct me if I made a false assumption. GitHub repoI committed the files in your ZIP into this repository. Look at the commits to see what I changed, and clone the repo to test my changes for yourself. Project formatYou are using the old format for project files. I recommend using the new (SDK-style) format for your project files. You can read more about that here. After I got your code to compile and removed unused files, I made this change. Storage of selected tab
Simple
|
@bender2k14 Just received this. Much to study here. Out of curiosity, I would still be interested in seeing how nested tabcontrols would work. In C#, I tend to break things down into "layers" allowing more and more substitutions as the application gets deeper and deeper. I'm not yet experienced with F# to see how this concept would work out. Thanks much...study in progress. As an aside, would i go the route of subModel for nested tabs, or subModelSeq...??? Thanks |
If you have a constant number of submodels, then use the |
@bender2k14 Got it! Thank you very much! So putting the DataContext Binding directly in the XAML allows Elmish.WPF to identify it correctly. The clear and simple use of subModel as shown here really should be added to the Elmish.WPF tutorial for simpletons like me. Studying through the submodel tutorial /sample did not help me much. (I am glad, however, that Foggy showed how to work with properties in the code-behind. I did not realize that F# automatically created the "Is Value" for use. I can see this to be a great help down the line). In fact, all the people at F# who helped me have been great! Learning top-down is the best method for me...now that I am down to first data entry form...I can really start to focus on F#. Thanks again. |
FYI: I renamed the repository I shared in #274 (comment) to this repository. |
In my ignorance, (I'm a newbie), I had hoped that simply expanding upon issue #270 would allow me to put a TabControl within a TabItem of the topmost tab control. I failed miserably right from the start. Assuming all the WPF/XAML/C# are correctly writen, here is the general setup:
XAML Topmost window
XAML -- Example XAML for ContactDetail
My current F# code is:
Clearly, among other things, the binding is wrong. But in trying to move toward subModel, I don't see how to change the DU DetailType in module FrontOffice to accommodate the new module definition of ContactDetail nor how to write the new bindings for the FrontOffice.
Please note that EACH UserControl will also have its own unique properties as they are standard input forms.
Any help is most appreciated. (I'm still learning the process of uploading a visual studio solution to Github).
TIA
Here is the zip file (I hope):
TabControlDemo.zip
The text was updated successfully, but these errors were encountered: