Does anyone know a good tutorial of using F# and OpenTK in Windows Forms?
These links I've already seen:
http://fsxplat.codeplex.com/releases/view/55463
http://www.opentk.com/node/1889
Thank you!
I believe the examples in the fsxplat project should be a decent starting point. There are two ways you can use OpenTK with WinForms.
If you're creating an application that has just one OpenTK window, then you can inherit from GameWindow and implement your logic in OnRenderFrame. Then you just create an instance of your object and call Run. This approach is used for example in the cube tutorial.
If you want to use OpenTK as part of a larger application, you can create a standard Form and add GLControl (from OpenTK.GLControl.dll), which is a standard WinForms control that renders content using OpenTK. You can find an example in DrawingForm type here.
Related
I am fairly new to WPF and Helix toolkit. I am trying to learn how to create a 3D model with Helix Toolkit WPF. However, I could not find any documentation about Helix objects, methods, and properties. So, I was wondering if any documentation exist for objects and methods of Helix? If yes, where can I find it?
Thank you very much.
The documentation on the website is very basic. There was also a new release which, as far as I know, is not in sync with the documentation.
But you can check out the source from github and have a look at the example projects. There are a lot of them. You can build and run them in VisualStudio.
I want to convert a small MonoMac application that I created so that it uses the MVVM pattern (especially to port in easily to Windows). I want to use the ReactiveUI framework. The current application uses an NSOutlineView control with a corresponding data source. As far as I could see there is no support currently for this control.
Is there a guideline how to adapt the NSOutlineView and data source so that it supports data binding as used by the ReactiveUI framework?
Unfortunately the data source support that ReactiveUI provides is iOS only and the code is quite complicated, but you can have a look at ReactiveTableViewSource and friends and try to create an equivalent for NSOutlineViewDataSource.
The general idea is, create a NSOutlineViewDataSource that can follow around a ReactiveList of ViewModels, and create Views for them as-needed.
Assume you have to develop an app, which needs a completely customized user interface so that you can not use any standard UI objects in Xcode.
How would you proceed to create such an user interface? Would you use the interface builder? Would you create something like a master parent UIView? What are the best practices to achieve this?
What would be the most elegant solution with less code duplication?
If by "complete customization" you mean the look and feel of the app,
then I suggest to design the IB objects you require using some design IDE's such as photoshop and then use those slices for your project.
This is the best option I find so far to get a complete customized look with minimal code, and by minimal, I mean you don't actually require any coding. You can do this complete customization within your Interface builder.
However, I don't think you can completely ignore standard UI objects as you require them to add basic functionality.
If customized controls are what you are looking for, then I suggest you to create separate custom control classes so that they can be reused anywhere in your project, or in other projects too.
Here are two wonderful tutorials on custom controls:
http://www.raywenderlich.com/36288/how-to-make-a-custom-control
http://www.raywenderlich.com/56885/custom-control-for-ios-tutorial-a-reusable-knob
Hope this helps!
As a Delphi developer moving to .NET I'm expecting similar concept like TDataModule & TForm to be available. However, I could not find way to make a reference from a component on a Form to another component on another Form (or Component) class.
I understand technical difference underlying the issue. Delphi component architecture is based on component-streaming (resource serialization), but .NET form is actually a code generator. If it's not possible to do such thing; I wonder how typically, form UI designer put common component into the same place ? Does it always have to be implemented in code only ?
For a bit more specific to what I'm trying to accomplish; I'm using DevExpress XtraGrid for which multiple instance of grids can reference to common "ExternalRepository" How can the grids in separated forms reference to the same instance of ExternalRepository ? Setting this property via code is completely eliminate grid design-time capabilities.
Any trick here?
Question answered by DevExpress Forum
Sorry, but it seams like it is not
possible. You will find some
explaination about this in this
support center issue:
Can the same PersistentRepository be
linked to many GridControls in
different forms in design time?
http://www.devexpress.com/Support/Center/p/DQ11884.aspx
Short answer: only possible at
runtime.
Regards,
Marc Greiner [DX-Squad]
I want to separate concerns here. Create and embed all the UI logic for the Custom XML designer, object model, validations etc in to a separate assembly. Then the Package framework should only register the designer information and ask for a UI Service and everything works magically.
This way I don't need to play with the Package framework (Visual Studio Package) assembly, when I need to modify the UI designer.
This question also applies to anything where you have to separate the UI logic from the Skeleton framework that loads it up, like a plugin.
I have several choices a ServiceProvider model, a plugin model or may be other.
Any samples, suggestions for patterns, links are welcome.
Update 1: What I am looking for is a thought such as - "Does Prism (Composite WPF) fit the bill? Has anyone worked on a project/application which does the separation of concerns just like I mentioned above? etc"
(I am still looking out for answers)
I've created a VSPackage that loads an editor. The Editor sits in a separate assembly and implements an interface that I defined. The VSPackage works with the interface, so any changes I make to the editor (and its assembly) does not affect the VSPackage as long as I don't change the interface.
What you're asking about seams very much like the separation of concerns that the MVC pattern tries to enforce.
ASP.NET MVC is already out there with a preview 5.
It's mainly for web but I think they are planning on using it also for WinForms, but I'm not sure.
I prefer the Model View Presenter pattern