Good afternoon everyone, someone could help me in the following situation:
I am creating some custom components in VS, but I need to add a component with no information, only to use their form to add some objects in real time depending on user actions.
It turns out that when I add a control in real time, this control is added to an instance of this object, and is not visible to the user.
Is there any way to make this object of static form? all changes made, is affected in all objects used?
I thank you!
Thank you ALL,
I created a static class and added a panel of static form, used the panel on the form and changed its ownership dock = fill with all the objects that it adds the panel were updated in form!
Related
I am creating a custom class with the below given definition.
One of the property type given below is of type content area(Media).
Issue: Since this custom property is in a popup itself, when clicking on the create new block in media content area, it opens the list of blocks to be added behind this popup as shown in the image below(carousal block)
Because of this ,I am unable to add the block within the content area.
.Is there a way to handle this wherein I can add the block within this custom class?
Any help is appreciated.
A bit late to the party here but will go ahead and answer it anyway for anyone else in the future who might encounter the same problem. So one option is to go with what Ted Nyberg suggested which will in the end probably provide a cleaner user experience. This is however a bit more advanced approach necessary due to a limitation in the product.
Another approach is to create a block instead of your custom class. This will provide the proper editor experience when working with the content area and will be faster to implement if you have no or little experience with adding custom css to the edit ui.
This goes for CMS versions < 12 and I can't say if this is still a problem in version 12 or not.
one button with wrapped list view
my searched result are:
1.worst approach: put add button on the wrapped list view.
2.bad approach: set two data template for list view.
3.?
thanks
I've had something similar a while back. In the end I decided to add a fake data item where I needed the button.
Say I had a list of MyDataItem, I created a derived class MyFakeDataItem and added that at the end of the list, after I finished populating it. In the WPF I created two data templates, one for each class, and a selected to decide.
I think it turned out quite elegant, since it allowed me to easily override any real functionality I had on MyDataItem, and add a command on the fake one to suit my needs.
Hope that helps.
How could I assign a custom class (Customer, Order, etc) to a DevExpress PropertyGridControl (or native Windows.Forms.PropertyGrid) at Design Time?
The PropertyGridControl.SelectedObject's dropdown list shows only the other Controls used in the form, but not custom fields declared by me. For instance:
Dim oCustomer As new Customer
I'd like to customize MultiEditorRows, styles, etc at design time to show my object properly.
At runtime it's as easy as:
myPropertyGridControl.SelectedObject = New Customer
Any help would be greatly appreciated. Please excuse my bad english.
At design-time only components that exist on a form can be selected as the grid's SelectedObject. Of cause, you can make your object a Component descendant and drop it onto a form to select it. But, I don't think that you really need this. As far as I understand, you need to generate grid rows at design time to customize them. If so, it's better to use the Rows Page designer to manually add the required rows and customize them.
I'm developing a WPF application that contains a lot of forms (about 20 different forms)
each form is connected to a ViewModel class that usually hold a single object that the form is editing its properties.
I need to give a graphical sign to the user if he changed something like in Word when you edited the document and it tells you need to save it.
If the user edited even one property I need to show that sign.
Is there a simple way to accomplish that? I don't want to create an event for every property editor I have (there are more than 300 of them).
Why not use INotifyPropertyChanged?!
Since you are using WPF, you can opt for SourceTrigger to Property Changed.
Check here, http://www.codeproject.com/Articles/15822/Bind-Better-with-INotifyPropertyChanged to know about using INotifyPropertyChanged.
I have a winform that needs to be loaded to update its controls' values or properties, before it is to be shown.
I found a stackoverflow question asking the same thing, but it's answer doesn't really help me. Load a form without showing it
Any sample code will be appreciated. Thank you,
Only you need create a new instance of the form and set the values of the controls.
check this code
Var
AForm : ChildForm;
begin
AForm:= new ChildForm;
AForm.textBox1.Text:='Foo'; //this control can be accessed here because the Modifiers property was set to public.
AForm.Show;
end;
Btw remember if you want modify or access the controls of another form you must set the property Modifiers of the control to access to public.
Create the form like this:
form := new MyForm();
Assuming you have implemented a method on MyForm to update the values, call it:
form.Update();//may need to pass parameters here
Show the form in the usual way:
form.ShowDialog();
From MSDN:
Form.Load
Occurs before a form is displayed for the first time.
So you can do all updates to the controls that are necessary before you show the form in this event handler.
But actually it is probably better to use databinding on the controls, so that they automatically reflect the current values you want them to show and you don't have to write any glue code bringing data on controls (and reading from them).