I want to implement in scichart3d viewport3d geometry object select
entity object (viewport3d geometry object) selection is not Support.
so i think I tried to put a series in the inside of an object so that I could select it.
but series overwritten with viewport3d object are not selected.
so I made it disappear temporarily when I clicked on an object, but it was not practical enough.
Below is an example I wrote.
I hope I can help you see this.
enter link description here
Is there any other way to implement the ability to select viewport3d geometry objects?
Related
I'm looking to create a custom control which represents a hand.
This at needs to be bound to a datasource, then if a value/index value is present in the datasource which is representing a particular finger, the finger in question should appear green.
Can anyone point me in the right direction to start of with such control?
Basically I'm creating an app which records which fingers people where their rings and how many.
So graphics on each finger will show Green plus a number showing how many.
Rough Hand Design for User Control
Any help or direction will be mostly appreciative.
I'd recommend a usercontrol rather than custom control for this. As I think that link Clemens posted says, unless you really are going to switch out the template of the control then you don't need to do a custom control - which would be harder than a usercontrol.
This will have at least one dependency property you're going to bind your collection to. Make that an ObservableCollection. You can then pass say 0,1,0,2,0. If people change the rings they wear super dynamically you can set one of the collection to itself to cover change notification to the control.
Inside this I'd put a viewbox with a canvas in it.
Grab an outline of a hand from somewhere. You want to get a geometry out of this so look for a svg preferably.
Maybe https://www.flaticon.com/free-icon/stop-hand-silhouette_57659
Then download and install InkScape.
Use this to trace bitmap if that's all you have then save as > xaml.
Open that file in notepad and you'll see a path with a set of sort of co-ordinates. Grab those. These can be used to define a geometry you use as a resource or directly used as the Data to a path.
I use such a resource for the email "icon" in this:
https://social.technet.microsoft.com/wiki/contents/articles/32610.wpf-layout-lab.aspx
Or you could probably use one of the hand icons from syncfusion's metro studio ( free ) https://www.syncfusion.com/downloads/metrostudio
A Path can be used for your hand.
You then want 5 itemscontrols for your thumbs and fingers.
You could maybe make each of them a usercontrol as well but I'd try 5 controls for a first iteration.
They should template each item they're given into a green rectangle defined in itemtemplate.
Position 5 of them to taste on your hand's digits.
Bind their itemssources by index to your collection and use a converter to return the number of objects specified by that. So if it's 3 then you generate three objects.
That viewbox is there to scale everything. So you can size your control however you like and the rings will stay on the fingers.
I have created a Windows Form, in which I am drawing 3 objects(Rectangle, Circle, and Line). I have 1 base class for all of them and separate classes for each of the objects. All objects are stored in an array.
In Windows Form has been created a Panel in which we draw and 3 buttons to draw an object.
What I need is to select an object with a mouse click and highlight it, then with pressing the fourth button to delete it.
The problem is I don't know how to select the object which has been clicked...
Any guides or piece of code, how to do it?
On your onClick event cast the sender parameter in your Object type something like this:
ObjectBeingClicked objectName = (ObjectBeingClicked)sender;
Or another example:
Rectangle rect = (Rectangle)sender;
I have two lists of different object types in my ViewModel. For example I'd say the first one is a list of all available images, the second one is a list of all articles. Each article belongs to an article category for which I'd like to show a thumbnail in the GUI when an article is selected and shown. For the sake of a simple example I assume that the Id of the category equals the Id of the corresponding image.
For a ComboBox this would be an easy task: I would assing the list of all images as ItemSource and then the article's category key to the SelectedValue. The SelectedValuePath would have to point to the Id of the image.
However a ComboBox does not make sense here as I only want to display the correct category image - I do not want any editing, a dropdown, etc... How would I solve this with a regular Image-UserControl (or maybe a similar UserContro)?
BTW: Right now I have to use an additional Property on my Article class which directly holds the correct image, but I think there should be a better way to solve this issue.
Any ideas?
Regards
ralf
There's no problem with creating a get-only property on your ViewModel that provides the image that the view should bind to. The whole point of ViewModels is to shape model data into a structure suitable for binding views to.
I am creating a user control that I would like to be able to generate the form entry fields based on what custom data object the form is bound to. Basically, I have a drop-down box that allows the user to pick what type of data object they are working with (user, address, etc.) That choice will bind the user control to the related data object. No big deal there. I am stuck, however, on how to generate the form fields based on the properties of the object. I feel like I have seen examples of this in WPF but am not able to find them now. All form fields will be simple label, textbox combinations in a stackpanel.
I know more detial will probably be required. Let me know what specifically you would like to know. Any help of direction is greatly appreciated.
Best,
Ryan
It sounds like you are looking for something which runtime generated, but check out the Xaml Power Toys, which will do this at design time
I was wonder if there was any method in which I can access an element which the user removes. For example when the InkCanvas is set to Select users can select elements and press delete to remove them. Is there any way of getting to this item if they deleted it? Any help is much appreciated.
Cheers,
Nilu
Update
#Drew: Not really. Say for example I have an image on the InkCanvas. I have some strokes attached to this image. If the user selects the image and then deletes it, I want the strokes to be removed.
Does handling the StrokeErasing event not give you what you want? You should be able to access the Stroke being erased from the InkCanvasStrokeErasingEventArgs::Stroke property.