cүвεя_נυηкιε 68 Posted September 18, 2018 Report Share Posted September 18, 2018 Hey HelloInsomnia,Wondering if you could offer any pearls of wisdom I have a "ComboBox" drop-down in an Xaml settings section (basically just a drop-down containing numbers 1 to 50 used for threading options), but i cant seem to change the value of the drop-down programmatically. Is it possible to auto populate a ComboBox drop-down (you know like auto set it from a config file when the bot is loading) ? ... When i get the value of a drop-down (ComboBox) it is in the format "System.Windows.Controls.ComboBoxItem: 5",When i try to set the value the drop-down just goes blank, ..If i enter a number it goes blank, if i enter the same format (System.Windows.Controls.ComboBoxItem: 5) it goes blank. Ive been fiddling with it for so long that its starting to drive me crazy ... er Any help would be greatly appreciated. CheersCJ Quote Link to post Share on other sites
HelloInsomnia 1103 Posted September 18, 2018 Author Report Share Posted September 18, 2018 Here you go CJ: plugin command("XAMLUI.dll", "Load Xaml UI", "<Grid> <ComboBox x:Name=\"threadsComboBox\"/> </Grid>", "", "", "Basic") clear list(%threads) add list to list(%threads,$list from text("1,2,3,4,5",","),"Delete","Global") plugin command("XAMLUI.dll", "xaml control list set", "threadsComboBox", %threads) plugin command("XAMLUI.dll", "xaml control value set", "threadsComboBox", $list item(%threads,0)) 1 Quote Link to post Share on other sites
cүвεя_נυηкιε 68 Posted September 18, 2018 Report Share Posted September 18, 2018 Here you go CJ: plugin command("XAMLUI.dll", "Load Xaml UI", "<Grid> <ComboBox x:Name=\"threadsComboBox\"/> </Grid>", "", "", "Basic") clear list(%threads) add list to list(%threads,$list from text("1,2,3,4,5",","),"Delete","Global") plugin command("XAMLUI.dll", "xaml control list set", "threadsComboBox", %threads) plugin command("XAMLUI.dll", "xaml control value set", "threadsComboBox", $list item(%threads,0)) You're a damn lifesaver .... again! Just tried it out and hey presto, I cant believe i didn't even entertain using the "control list set" (hanging head in shame). Thanks man, I am eternally grateful CheersCJ EDIT : Just in case there are others that come here to find help for this specifically, ...The ComboBox/Drop-Down Items list needs to be empty for it to work (or it will throw an error stating you need to empty it) Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 22, 2018 Author Report Share Posted October 22, 2018 hi Guys, How can I design the bot using XAML and Datagrid? Do i need to code?I have the plugins but I have no idea on how to use them. but you guys seem to be having a great fun with it.Can you help? For XAML you should use either Visual Studio or Blend (comes with VS). You can design it in there and then use the code in Ubot. I can't really explain in one post but maybe if you look at my video in this thread, and the download it will give you some ideas on how things work. You could drag things around to design it and then use the properties panel to name each element. That way you wouldn't have to write code. But it's much much much better to write the code and will be much easier in the long run. So maybe at first you can drag elements out and just take note of what they are called in the code and then fill out the properties in the properties panel and again take note of how the code changes. Then when you feel more comfortable with the code you can use that instead. For datagrid you will add that to a grid. So you would name a grid and then there is a command something like add datagrid to grid and you can add it that way. Quote Link to post Share on other sites
promzzz 0 Posted October 27, 2018 Report Share Posted October 27, 2018 Hey HelloInsomnia,thanks you for share this great stuff,and I have a question about dategrid.can the dategrid dymatic update the date when a table update?thanks Quote Link to post Share on other sites
HelloInsomnia 1103 Posted November 5, 2018 Author Report Share Posted November 5, 2018 Hey HelloInsomnia,thanks you for share this great stuff,and I have a question about dategrid.can the dategrid dymatic update the date when a table update?thanks There is a command called table to datagrid that you can use. Quote Link to post Share on other sites
SaHiN 14 Posted April 3, 2019 Report Share Posted April 3, 2019 hi HelloInsomnia, Metro Example code for use xaml ? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted April 4, 2019 Author Report Share Posted April 4, 2019 hi HelloInsomnia, Metro Example code for use xaml ? Your image isn't showing up. But I think that XAML plugin does have some support for Metro, I just haven't really used it with XAML plugin other than changing the basic theme. But you might be able to do more with it. 1 Quote Link to post Share on other sites
SaHiN 14 Posted April 22, 2019 Report Share Posted April 22, 2019 hi HelloInsomnia, datagrid context menu add ? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted April 22, 2019 Author Report Share Posted April 22, 2019 hi HelloInsomnia, datagrid context menu add ? I don't think that works properly with the XAML plugin, have you gotten it to show a menu? 1 Quote Link to post Share on other sites
SaHiN 14 Posted April 22, 2019 Report Share Posted April 22, 2019 I don't think that works properly with the XAML plugin, have you gotten it to show a menu?yes, ı have xaml and datagrid plugin. 1 Quote Link to post Share on other sites
gijosu 9 Posted April 22, 2019 Report Share Posted April 22, 2019 you can write the context menu within the xaml code then define the code in ubot and use xaml event hook to call it, 2 Quote Link to post Share on other sites
Eddie 14 Posted April 23, 2019 Report Share Posted April 23, 2019 xaml+datagrid and ustrap which one do you suggest? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.