I have created a custom control with new dependency property (TagToSet) of type MyTag(id, name, value).
After adding this control to my window design, and going to the properties to set the value of the new dependency property. Here I want to open a dialog to select the Tag that I want (like the case when the dependency property is collection).
note: the Tag property is not a collection, and the required dialog should connect to a WCF service to list the available tag.
Thanks
Ok, here is the start key Microsoft.Windows.Design.PropertyEditing
for those who are trying to do like me read this
article
Related
I'm build a new authentication provider for DNN and I'd like to know if there's any custom attribute that can be applied to the property settings object that is bound to the PropertyEditorControl so that its label shows a different name from the one used on property.
For instance, suppose my classe has a property named ServiceId. Instead of showing that name, I'd like the PropertyEditorControl to show the string "Serv. Identification".
It seems like this can be done through resource files with predefined entries for each property you're interested in changing the label...
We have a block type in our EpiServer project that can have either specify a video to use (an EPiServer.Url) or a youtube id (string). The thing is that it only makes sense to use either of those, not both. Is there a way of marking one field readonly if the other is filled?
Not using vanilla editors, I'm afraid. But you could fairly easily create a custom editor (dojo widget) for that use case.
Here's an example of a custom editor to display a checkbox list for selecting blocks, instead of the standard editor for ContentArea properties:
https://tedgustaf.com/blog/2016/create-a-custom-editor-for-a-content-area-in-episerver/
However, the same principles apply for any content type.
To be clear: you don't need a custom property type, just a custom editor. The backing property type could still be string, which would contain either the URL or the YouTube ID.
If you want the property to be more developer-friendly, you could create a block type with "YouTube ID" and "URL" properties, and then define a content property of that block type.
You would then use your custom editor to set either the "YouTube ID" or "URL" property of that "VideoBlock" property.
We have created a similar editor before, where the editor would either select a video using a dropdown, or specify a custom video stream URL.
When using InteractionRequestTrigger for showing a custom popup view, the same instances of the View and ViewModel will be used each time it's shown. How can I recreate/reset the View/ViewModel, so the state of the View is "as default". The problem is that I use a TabControl in my popup, and the last selected tab is still selected after I close and reopen the popup.
Any ideas?
Here is method that won't require you to create a new set of nuts and bolts.
Implement IInteractionRequestAwareon your view model.
Create a integer property on the view model to store the index of the selected tab
Bind TabControl.SelectedIndex to the new property
In the implementation of the IInteractionRequestAware.Notification setter, reset the selected index property to 0.
You have to create your own PopupWindowAction. Add a property for the WindowContent Type and use that to create the new instance every time you show the popup.
In my application's viewport i'm showing the form panel with a list of fields in center region and property-grid in east region.
I need to show the list of properties of the field in the property-grid on selection of the field.
The user is able to change the properties.
Now my requirement is to apply the properties dynamically to the field.
Is there any generic way to achieve this?
Can someone help me?
Some properties have getter and setter functions, but not all of them and I doubt they are consistent enough for what you are trying to do.
My suggestion would be to store the config object for each field, the config object would have each property that you want to be able to change using your property grid. When a property changes, remove the field from the form. Re-create it using Ext.create and passing your config object as the second parameter. Then just insert the object back into the form.
EDIT: You can probably skip using Ext.create by using the insert function on your form panel, it seems to be able to accept a config object directly.
I'm using a VirtualTree as a layer selector for a mapping application, and I'm trying to have a "Layer" or "File" show a green icon when a layer is active and a grey icon when it is not.
Can you...
Set the icon of a selection? or
Bind an icon of an item of a VirtualTree to a boolean property of an array?
I see there is a property for: iconOptions that takes a map and this references qx.data.SingleValueBinding, but how to actually implement it is stumping me. My tree is getting created using:
var store = new qx.data.store.Json(url);
store.bind("model", tree, "model");
I tried:
tree.setIconPath("icon");
but that requires that I have an icon property for every element of my JSON file to display the Folder/File and doesn't allow for the multiple (on/off) capabilities.
Any suggestions?
have a look at virtual tree demo. Using the setIconOption you could specify a convertor takeing other data into account when deciding what type of icon to set.