1
Answer

Contextmenu in TreeView RightClick

Roy r

Roy r

14y
3.9k
1
Hello ,

I am using silver light 4.I've added tree view control on my page.

For example It has three nodes Node1,Node2,Node3 .

Now what I want to do is : when I right click on any of the node I want to open one context menu with 3 items ( Edit, Delete, Add ) .

How can achieve this ?

-Thanks
Answers (1)
0
robin 0

robin 0

NA 190 0 20y
For using DirectX (DirectDraw, DirectSound, Direct3D) you'll need DirectX SDK. It can be downloaded from Microsoft. There is a help inside SDK. You sure can use png, bmp, jpg files with DirectDraw. About forms - DirectDraw engine creates surface of drawing... you can call it a control, like pictureBox.... inside a form. So, of course it is compatible with C# GUI.
0
s00014405

s00014405

NA 24 0 20y
Thanks for the advice! GDI+ was what my lecturer told me to use for an Air Hockey game and i had no idea it was gonna be slow. You are right though - i posted code from a Pong game in GDI+ on the C# Corner Examples and it did really move at a snail's pace. Thanks again! I have no idea how to use DirectDraw - with DirectDraw, can i use the PNG / BMP / JPEG's i currently have on my form. And also, is it backwards compatible with C# (can i use C# forms with DirectDraw)? Anyone point me to some good resources / tutorials on using DirectDraw?
0
robin 0

robin 0

NA 190 0 20y
GDI+ is not for fast-dynamic pictures, it's rather for static images creation.... It's highly recommended to use DirectDraw for games creation. It's not much harder to learn then GDI+ engine, but much faster. About buttons... you can try to use imageList with all needed images, and on button drawing - assign image from imageList to button background image...
0
bilnaad

bilnaad

NA 686 0 20y
Urhmmm, maybe it's bad practice to write games using the GDI. GDI is famous because it's very slow. So I wouldn't recommend writting games using it. Rather try DirectX or other APIs that are designed for game development.