Page 1 of 1

[SOLVED] canvas Button position + ComboBoxItem problem

Posted: Sat Jul 09, 2016 11:47 pm
by Andreas2000
Hello,

I have 2 problems. I create a button and want to position it with Canvas.Left="150" Canvas.Top="30". But it doesn't work. The same method with TextBlock-object or Rectangle-object works fine.
Then I create a ComboBox. But I can't create a ComboxItem. How can I add Items on other way?

best regards Andreas

Re: canvas Button position + ComboBoxItem problem

Posted: Sun Jul 10, 2016 1:26 am
by JS-Support @Userware
Dear Andreas,

Thanks for your message.

- The issue related to positioning Button controls in a Cancas is a recently-introduced regression and has been fixed in Beta 8.4, which you can download at:

http://forums.cshtml5.com/viewforum.php?f=6

- The ability to add any UI Element inside a ComboBox (rather than just text) is coming soon. It is expected within a few weeks.

Regards
JS-Support

Re: canvas Button position + ComboBoxItem problem

Posted: Sun Jul 10, 2016 2:42 am
by Andreas2000
Hello JS Support,
Thanks for information and help. The position poblem was fixed. Now it works.
ComboBoxItem problem: ok. I will wait

best regards

Re: canvas Button position + ComboBoxItem problem

Posted: Sun Jul 10, 2016 3:13 am
by JS-Support @Userware
Thank you.

In the meantime, you can add strings to your ComboBox, either by setting the "ItemsSource" property to a collection of strings, or by setting the "ItemsSource" property to a collection of objects in conjunction with the the "DisplayMemberPath" property to choose which property of the object to display (cf. Showcase sample app) or by adding strings to the "Items" property directly.

Thanks.
Regards
JS-Support

Re: canvas Button position + ComboBoxItem problem

Posted: Sun Jul 10, 2016 3:38 am
by Andreas2000
Thank you. I will try it in this kind with ComboBox.

In the last minutes I tested a ListBox object. On the attachment you can see the height value will be ignored. Then the height-value is smaller than the list of Items, the ListBox will not be shown correctly . Also the SelectedIndex Attribute doesn't work. I get a error message. I tested also SelectedItem. It's the same.

best regards Andreas

Re: canvas Button position + ComboBoxItem problem

Posted: Sun Jul 10, 2016 4:02 am
by JS-Support @Userware
The difference is height is due to the fact that the scroll bars are not yet supported in the ListBox of CSHTML5. For the moment, or need to surround your ListBox with a <ScrollViewer/>.

As for the SelectedIndex, this is odd, we are going to look into it. (FYI, the SelectedItem property should work fine)

Thanks.

Regards
JS-Support

Re: canvas Button position + ComboBoxItem problem

Posted: Sun Jul 10, 2016 5:02 am
by Andreas2000
The ComboBox with a binding works well. Only the preselection doesn't work yet. SelectedItem shows no reaction (but no error message) in my little program.

best regards

Re: canvas Button position + ComboBoxItem problem

Posted: Mon Aug 29, 2016 6:46 am
by JS-Support @Userware
Hi,

The ComboBox SelectedItem should now be fixed in Beta 9.1.

You can download it from:

http://forums.cshtml5.com/viewforum.php?f=6

Thank you.

Regards,
JS-Support