Show specific properties in Select properties dialog - cumulocity

I would like to show the opened doors of a bay visualy in a SCADA widget.
So I would like to get OPEN / CLOSED state from the last triggered event, but it's not possible to select a property of an event in the "Select properties" dialog. So I can update the properties of the device each time a such event (OPEN / CLOSED) is triggered to store a specific "currentDoorState" property.
But it's also not possible to map this "custom" property to the placeholder of the svg file.
Do you plan to add the ability to select or enter a specific property in a futur version of Cumulocity? Is there a workaround to implement what I would like to do?

Related

How do i manipulate the data templates inside listbox in uwp

I am making a chat application using XAML in UWP.The side panel is consisting of users. like this.
Everything is in Listbox in which I have this template that consists one ellipse as a circle which is like an indicator,one user image,textblocks and one toggle switch.I have to give states to the toggle switch in on the state it should change the green color of circle and make it red.
I want to give this functionality in code c# in MainPage.cs. I made the object of toggle in toggled Event Handler but I am not able to access the other elements inside the data template like ellispse,textblock.
What is the other alternative way of doing this?
NOTE: It has to be in listbox because I want to use the same template for every user.
The best way to do this would be to use data binding.
You would define a ViewModel class for the item, which would contain a bool property and would react to the toggling of the switch in the setter or have a Command which you would execute when the state event changes using behaviors.
If you really want the code as a event handler on main page, you have some options. To get the item associated with the toggle, you can use its DataContext property and cast it to the data type you are using. Alternatively, you can use Visual Tree Extesnions provided by the UWP Community Toolkit. This enables you to find the parent (probably Grid) where you store all the item controls and then manually find the user image, TextBlock, etc.

Assign value to property node

I starting using LabVIEW about 1 week ago. In a tutorial I watched this picture
I am wondering how can I assign the value "Disabled and Grayed out" to disabled property value of the button?
There are a couple of ways to create property nodes in LabVIEW. This method is the quickest and easiest and matches your picture.
Add the button to your front panel.
Right-Click and go to Create >> Property Node >> Disabled in the menus. Click on this.
LabVIEW will automatically switch to the block diagram and let you drop the property node.
By default it is a read node. Right-Click on the block where it says "Disabled" and select Change To Write in the menu (There is also Change All To Write if you have multiple properties.
Hover over the input so you get the wiring symbol. Right-Click and select Create Constant to create the correct Enum constant to write to it.
That is the basics and the way most people start out - a couple of extra tips:
The node is expandable hover at the bottom and you get the resize block, drag this down and you can set more than one property on the same node. These are set in order from top to bottom.
Left click on each property to change which property it is.
Right-Click and go to Link To... in the menu to change which button it applies to.

How to create click event for dynamically created custom control?

Let say that I'm creating thousands of custom controls, each control has own data assigned to it (like name, id, etc.), now I would like to add
click event for each of these custom controls
access from software any of these dynamically created controls
So I would like to show MsgBox if user click control #452, which will be returning values assigned to object in custom control class (passed during creation of new control on user form)
Second thing is that I would like to access at any time any of these objects and read values assigned to object in control....
How to do it ? Each control has name assigned like "Example1", "Example2", "Example3" but I don't know how to access it from code as any of these exists during writing...
Also I were trying to find how to create and rise events but it seems that all solutions are for statically created controls and I need to rise events for dynamically crated custom controls....
Thanks in advance for any tips/help how to solve it.
I'm using VB.NET
Ok I figured it out !
It is very simple actually.
If any one will be looking for an answer :
To access dynamically created control first we are going to name it :
Dim Control as new CustomControl
Control.Name = "Name" & Counter
Next after we've created new controls we are going to access it using:
Dim _Control as new CustomControl
_Control = Ctype(Me.Panel1.Controls("Name1"), CustomControl)
MsgBox(_Control.Name.ToString)
Viola
I still not sure about custom events for all controls on custom control (so where ever user click, there should be override event which returns something back, now I can only either click panel container (not labels/pictureboxes) from code inside user class, or event per control on custom control (but issue is that I want to pass data from custom control to user class).

VB.net User Control Issues

I've created one user control which have textBox & DatabGridView etc. When any user start typing in textbox then the filter is applied in DatabGridView. Now I want to add following features in this control how can I add these?
I want to use same control for supplier, customer, vendors on a single form, so I've placed it 3 times from toolbar. But for each control I want to fill different data from database. So what will be the best way to bind the control?
As we knew each table (customer,supplier & vendor) can have different columns, so I also need properties to set them. I've added property to my control but how can I ensure user has assign value in it? I.e. if user run the form and X property is not assigned to control then it should show message.
Note: I've tried it on control load event but didn't get any success because control's load event is occurred prior to form load and I'm assigning property on form load.
Please help....

2 column table presentaion control, like the properties window in the dev environment

in a windows form if i want to duplicate the properties window layout on my form, which is basically a 2 column table with title on the left and value on the right, what control do i use to achieve that?
A DataGridView component can be used to achieve a similar visual style and functionality, though it is not exactly the same.
To add columns, click the Smart Tag and change the settings, click "edit columns", and you know the rest.
If you want the exact same functionality as the properties window, and let your users edit the properties of an object, you can use the Properties control.