Jump to content
UBot Underground

Gui Tutorial And Template Using Xaml And Datagrid


Recommended Posts

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.

 

 

Cheers

CJ

Link to post
Share on other sites

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))
  • Like 1
Link to post
Share on other sites

 

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 :)

 

 

 

Cheers

CJ

 

 

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)

Link to post
Share on other sites
  • 1 month later...

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.

Link to post
Share on other sites
  • 2 weeks later...

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.

Link to post
Share on other sites
  • 4 months later...

hi HelloInsomnia,

 

Metro Example code for use xaml ?

 

YsreDQXtTB2ImPfav8lVJQ.png

 

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.

  • Like 1
Link to post
Share on other sites
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...