Windows phone draw rectangle - windows-phone

I am just want to draw a rectangle in windows phone canvas. I have tried some technique but each time i have failed to accomplish my job. i want to draw this rectangle and use just like in the paint application of the windows in desktop version.

There are two examples for you, you can download it from the below links.
Sample Project 1
Sample Project

Related

vb transparent background with gradient

I have a problem with gradients transparency key in a PictureBox in visual basic form . I want to get a good transparency as it is in the first form (in PS)
That's what I did:
1- Drawed the picture in Adobe Photoshop (CS6) with these preset:
2- Saved the picture with this option:
3- Added the picture to a PictureBox in vb form with blue BackColor
4- Changed form TransparencyKey to blue
5-The (awful) result:
The Form.TransparencyKey property is not really what you're looking for. It will only make the parts of the image transparent that exactly match the color you specified (Color.Blue, in your case). That means that the parts of the gradient in your image that have even a remotely small amount of red or yellow in them won't match the filter.
Among the things you could try is to have your form drawn with alpha blending. Here's a library that lets you draw stuff with transparency, which looks like what you want.
Alternately I dug up a walkthrough on CodeProject. It involves a lot of chatting with forms interop and the OS, which might not be your cup of tea.
Note that GDI+, the system Windows Forms uses for drawing, is somewhat slow, especially when drawing images. I don't know what your project looks like, but if you're going to draw a lot of transparent images, I suggest looking towards Microsoft DirectX.

VB transparent picturebox over several pictureboxes

I am currently writing a program that requires a picture box with a transparent image to go over several pictureboxes. I have looked for hours now and found nothing useful. the program is a rubiks cube solver. each square is represented as a picturebox and the cube is shown in a net form. I cant upload images as my account is new but i have included an image of a rubiks cube in a net form. now imagine a semi transparent image going over some of the squares (pictureboxes) to represent a visual guide to the rotation about to be made in the solve process. If you need more info I will do my best and upload images and add code for better clarification if needed. If this is not possible is there any alternatives that I could attempt? Thankyou
I don't think what you want is possible. I was actually trying to solve the same problem about 2 days ago and to no avail. You can't have transparency to work with multiple pictureboxes on winforms. What you need to do is draw the images using Graphics like one over the other. Use 1 picturebox and do Graphics to overlay the picture on the picturebox. Or have the main picture as the form's background image and use pictureboxes, this was what I did. This is surely easier using WPF. Alternatively... Try to check this imaging SDK.
http://www.gdpicture.com/
This might help overlaying your images.
And this too, this is basically the one using 1 picturebox and overlaying using Graphics.
VB.NET Winforms: Overlay two transparent images

How to make a drawing canvas with Mouse Drag in windows phone

Any Suggestions or guidance will Help. How to create a drawing canvas in a windows phone Application.
Like the pencil tool in Paint. is it possible. A logical Expression will also Help.
See i Cant code the entire thing But here's a link that might help Go through it carefully.
Drawing on canvas windows phone
Let me know if any confusion

How Do I recognize basic shapes with Ink and WinRT

Is there a simple way to get shape recognition working with WinRT?
With WPF it was simple I could just use InkAnalysis but it seems that it is not available in WinRT(?).
I want to be able to draw basic shapes circle, rectangle and square and I want to be able to recognize them.
Any suggestions?
The GestureRecognizer class that you get out of the box only supports the simple gestures used in various standard Windows 8 controls. For your scenario you could try the 1$/n$ recognizers I linked to in this previous question.

Panorama Background Image is Blurry

I have a Panorama image in my app and when it loads on the phone it is blurry. It's like when you remote desktop into another computer and you have the color settings way down. The gradient is made up of 6 colors and I can count them from the big blocky change.
Is there something special that needs to be done for an image to work as a Panorama background?
I've tried using a JPG and PNG version of the image and it looks the same for either.
I know this is an older post, but with Windows Phone Mango (7.5) you can now specify 32 bit by modifying your manifest.
BitsPerPixel="32"
Add that to the <App xmlns="" ProductID="" BitsPerPixel="32"/> and your images will now display in 32 bit mode. You get a lot smoother gradients and color resolution.
The startup screen still is only 16 bit, and your icons will only really display in 16 bit. But you can get nice colors in your app.
Windows Phone 7 currently renders with 16bit color depth, unlike your desktop/emulator which has a higher color depth. As a result, gradients won't look the same as they do on your desktop PC.
This thread here has some great pointers on how to optimize your images for this environment:
Is there a way to render PNG with gradients in Internet Explorer Mobile 7 correctly?