Syncfusion v17 Winforms TreeView controls has odd behavior - winforms

At work we are upgrading numerous of our applications to run on .NET Core. We upgraded one of our winforms apps which uses SyncFusion controls and we started seeing a strange behavior.
If you create a TreeView control with the parent item not showing a check box, but have the children show a checkbox. When you click the first child it checks all the children under that parent.
Thinking that we had clearly done something wrong in our code, I downloaded the demo apps from Github. Their CheckboxBinding demo seemed similar (parent items with child items with checkboxes). I updated the code to not show the checkbox on the parent items and ran.
To my surprise, we get the exact same behavior.
Has anyone run into this with SyncFusion TreeView control?

We could observe that you are enabling checkbox for child item and disabled for parent item. But while you checking the first child item, it automatically selects all child . We too checked in your provided example, but we could able to observe that on selecting the item in checkbox , it does select only that particular checkbox item and not all other items. Please find the video for the same from following
Video:
https://www.syncfusion.com/downloads/support/directtrac/general/ze/Checkstate_Treeview-949457604
So kindly check the video and confirm us whether our understanding on the reported behavior is correct. If not, please send us the video that shows the exact issue, it would be helpful for us to proceed on it further. We have ensured it in 17.4.0.55v
Regards,
Vijayalakshmi VR

Related

ToolStripTextBox, ToolStripComboBox not automated

In UI Automation, when automating the toolstrip items we are facing an issue which is described below
I am adding toolstrip items as follows
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1,
this.toolStripButton2,
this.toolStripComboBox1,
this.toolStripButton3});
When running the UI Automation(System.Windows.Automation), UI automation finds the controls till toolStripButton2 (i.e) controls on the left side of toolstripcombobox is getting recognized but on the controls on the right side.(If i make the combobox to go the right most control everything works fine)
Note: In Inspect.exe tool from windows kits, all the controls are shown but when trying to access the last toolStripButton3 returns null.
Here i have attached the simplified code, the buttonCollection is expected to get 3 buttons but it gets only two in my case.
AutomationElement toolstrip = viewTab.FindFirst(TreeScope.Children,
new PropertyCondition(AutomationElement.AutomationIdProperty, "toolStrip1"));
AutomationElementCollection buttonCollection = toolstrip.FindAll(TreeScope.Children,
new PropertyCondition(AutomationElement.LocalizedControlTypeProperty, "button"));
Both ToolStripTextBox and ToolStripComboBox are showing the same behavior.
I would like know what is going wrong my approach.
I've posted one approach which would allow you to access all the buttons, in response to your question at https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/2363de9f-3bf0-48dc-a914-1eef5bcf1482/toolstriptextbox-toolstripcombobox-not-automated?forum=windowsaccessibilityandautomation.
Thanks,
Guy

Tree node selection in winform app not working properly

I am working in Winform app (ticketing app) where people can create support ticket,close etc.
once you select a particular tree node in left pane (either manually or programatically) it's associated control/view gets displayed in right pane of form.
In few scenarios, even though the particular node is getting selected properly (though code) it's associated control not getting displayed/loaded. To brief,
Under root node, I have a open incident, once I close the incident it disappears from opened section and gets added to history section under treeview.
once click on "create incident" button a new tree node gets created with new ticket number and it's associated control gets displayed on right side of form.
So problem is, if I close a open incident and then click on "create incident"; even though new node getting created and it's associated control getting loaded but the control not getting displayed; instead the closed incident view only shown.
Somehow, the new nodes control getting hidden/jammed inside.
I am new to winform/treeview control.I debugged to see if anything going wrong but couldn't find any; neither Google'ng helped me.
Anyone here have any idea what's going wrong (OR) have you faced the same issue. Please help and let me know how to solve it.
PS: Sorry can't post any code and I know without code it's bit difficult to answer but if you can provide any pointer that would help me too.
When you select a treenode and the associated control is not getting loaded, one of four things is probably happening:
The code to view the control is not executed,
The code to view the control is being executed but does not work properly,
The code to view the control is working properly but it is being executed again or hide the control, or
The code to view the control is working properly but some other code is being executed to hide the control.
Set breakpoints in the code to view the control to see which of these is the problem. Once you have narrowed it down, it should be easier to fix.

How to make UI elements load without freezing? (WPF)

I have a treeview and a textbox. As I type in the text box it updates the tree view in real time (filtering by what I type and matching against the objects in the tree view).
The problem is it starts freezing a bit as I'm typing in the box. ie. while the treeview is updating the text box freezes. I have put the logic that populates the treeview in another thread hoping this would make it run a bit faster - which it did, but not enough. I believe it is the actual UI updating which is causing the responsiveness to diminish.
What are some ways that I can tackle this problem? Is it possible to have different UI elements (in this case, the treeview and the textbox) handled in different threads - rather than just the logic which is the case now?
Thanks
Your problem is that only one UI thread exists!
A possible solution to your problem is to filter the treeview after a few milliseconds after the user has made ​​a text input.
Another possibility is to make the filtering in a separate task and the result of the Treview reassign.
I hope this helps you with your problem.

Creating custom WPF layout panel - ignored children not disappearing

Good afternoon. I'm creating a custom WPF layout control that needs to omit children from the measure/arrange process if they won't fit in the available area. I'm testing with Blend.
I have tried overriding GetVisualChild(n) and VisualChildCount to try and allow the runtime to only recognize certain elements as my desired children. This seems to work okay, but the big issue I'm having is this:
I drop some children into my layout control from Blend. I then shrink the control where some children won't fit inside my panel. The issue is that the children that are no longer in view remain rendered on the Blend design surface. I have tried invalidating their visual, calling "RemoveVisualChildI()".. but nothing seems to want to make the rendered visuals disappear.
Breaking into the GetViasualChild(...) method, I am witnessing Blend and the runtime are only asking for the actual visible children (fully contained inside my layout panel). So, it seems to me that the problem is tied to the child elements thinking that they still need to be rendered..or that the container panel just doesn't know it needs re-rendering.
Any clues? I can try and provide more detail if it's needed, but my basic need is the ability to selectively hide/show (omit from the measure/arrange process) certain children of a custom panel.
Thanks!
- Sean
Since nobody has responded, I figured I would share the solution. The visual tree is established through the AddVisualChild(...) method on the Visual base class. The Panel takes care of this for you with it's Children collection. To solve this, all I needed to do was create an instance of a UIElementCollection, and let it do the dirty work. When that class is created, it is passed a visual parent and an optional logical parent. When elements are added to that collection, the parent / child relationship gets established automatically.
Hope this helps the next person!

WPF Combobox bug when form allowtransparency=true

I have found the following in WPF:
I have a form with AllowTransparency=true. Inside the form I put a Combobox.
I add some items to the combobox.
I run this application and click on the combobox. At first it does not seem to appear at all. On closer inspection (after adding more items) I see that it is actually appearing behind the form. If I add enough items it become visible from behind the form.
If I just change AllowTransparency=false, then all is fine.
This looks like a bug in WPF (3.5 SP1).
Any one know of a workaround for this?
Go to
https://connect.microsoft.com/dashboard/?wa=wsignin1.0
submit your feedback after searching #
https://connect.microsoft.com/VisualStudio
https://connect.microsoft.com/VisualStudio/feedback/CreateFeedbackForm.aspx?FeedbackFormConfigurationID=1160&FeedbackType=1
and mention steps to reproduce.
There was an update of 3.5sp1 but you could test,but I doubt
http://www.microsoft.com/downloads/details.aspx?familyid=6c095bba-6100-4ec9-9c54-6450b0212565&displaylang=en
AllowTransparency is slow and buggy and shouldn't be used - it's a great way to run into bug in various display drivers.
You can get almost anything you like without using AllowTrasparency, take a look at this post for examples:
http://blogs.msdn.com/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx

Resources