implementing the WP7 chatting style - c#

I'm trying to design a chatting app, I want the sender/receiver's text to be shown inside these text balloons that's in the native messages app in WP7.
I can put each conversation in a textblock and color it like the current used theme, but still it won't have the pointy thing of the balloon here:
So how can I implement this to my app?

Check out these links:
http://www.scottlogic.co.uk/blog/colin/2011/07/a-wp7-conversation-view/
http://shawnoster.com/blog/post/Recreating-the-Windows-Phone-7-message-e2809cbubblee2809d-style-in-Silverlight.aspx
They should have all you need to get started.

Read up on Shapes and Basic Drawing.
What you want to do , is to define two shapes (one being a mirror of the other), with the "triangle" popping out as part of the polygon.
I'll recommend a tool like Expression Design or Expression Blend for creating the polygon.

Related

How to create a drawing in a window in WPF

I've decided to learn a bit of WPF and I've created an application with the Mahapps Metro library and it interacts with a SQLite database (Unrelated but a bit of background).
I'd like to draw an object, let's say a triangle, in a new window.
I've seen this - Click - but the drawing of the shape needs to be visible to the user. So the user will see the line being drawn from point A to B to C to A. The image will "reload" after a few seconds i.e. Clearing the window/canvas and redrawing the triangle.
Are they any libraries out there that might make this easier or does WPF have something else I can use to achieve this?
Also, the redrawing of the triangle will be in a separate thread running a loop. Something tells me this isn't going to be very efficient. Is there a better way initiate a "redraw"?
My "answer" are some helpful searches and a few results that might help you get to the next step of deciding on a design that works for you.
Yes, WPF does have facilities to help you achieve some animation in drawing lines.
I searched for "wpf animate line drawing" and some interesting links for your research are:
How do you animate a line on a canvas in C#?
generating animated line
Drawing line "slowly" programmatically with wpf
Hopefully this gets you going in a good direction. Best of luck with your project.

Mapping areas of Image

In my desktop application i want to place a country map and states clickable. On clicking certain state the color of state should change and it should show some state specific info.
What will be the best approach to do it?
-HD
WPF shapes such as the Path are clickable so it is relatively easy to capture a click on a state and change the fill of the shape. The hard part is drawing all the shapes.
You can make image maps with GIMP. Go here for an official tutorial from GIMP: http://www.gimp.org/tutorials/Image_Map/
Now, you'll have to figure the rest out in the programming language you are using. :)

Drawing on the backside of a WPF Window

I have quite an uncommon question: Does anyone know whether it is possible to draw something on the backside of a WPF Window?
Normally people create Controls or draw images on the front side of a WPF Window. However, I would like to draw things on the backside. Here is an Image taken with the Snoop tool. Snoop has the functionality of viewing a WPF Application in 3D. Using the so-called Zoomer it is possible to look behind a window.
I would like to either draw an Image or put a Control so that you can see it with using the Zoomer functionality of snoop at the back of the application.
Has anyone got an idea of how this could be done?
Thanks,
Christian
There is no backside.
What most applications do is simply replace the control/window by another one as soon as it has rotated by 90 degrees.

C# Rich GUI Application

I want to create an app to declare microprocessor's pin as input/output with mouse clicks. I created a mockup - http://i.stack.imgur.com/GOHQ5.png. I think it would be best to declare each pin as an separate class so I can change its state easily, but I dont know how to achieve that along with graphical representation of it. Each square should be clickable and changin its color. Then foreach loop to iterate throu them and get state information of each.Should I go with WPF or Silverlight or just simple click events? What is the best approach to implement that in .NET?
If you want a website, do Silverlight. Otherwise do WPF because it will be easier.
I'd just do an image for the center piece, unless it's going to change size, in which case you could just draw it out of lines and an ellipse. Use a Canvas in your main window, not a grid. Make a Pin class that handles the state/color/positioning information. You can draw the square with a Rectangle.
Don't worry about MVVM, that's going to be more trouble than it's worth for your case.
Silverlight or WPF doesn't make much of a difference in this case. Deployment of the application (web or not) might help you chose.
Implement the state machine/processor as a class (ViewModel) and implement the UI as a View. That will help to keep the code clean. Look up MVVM Model-View-ViewModel.
You could do this in WPF, Silverlight or Winforms.
From a graphical perspective, it might be easier to reproduce your mockup in WPF or Silverlight. Choosing between WPF and Silverlight really comes down to how you want to deploy the app (eg for SL you need a web server).
Make your choice, start writing code and then come back here with specific issues as you encounter them.
Good Luck.

How can I make a windows application that doesn't have a square form shape?

I want to make an application that is similar to the World of warcraft launcher.
My main concern is to not have a square windows form with the typical close buttons, but a custom shape. How can I achieve this with C# and the .NET framework?
Here's a tutorial on Creating Irregular Non-Rectangle Windows using WPF.
Consider this tutorial for creating Shaped Windows in WPF. It's got sample code in C#.
There's a great piece of source code at http://www.codeproject.com/KB/GDI-plus/CsTranspTutorial3.aspx that allows you to make a form based off of any image with an alpha channel (like a .png), so that the transparent parts of the image correspond to places where you see through the form.

Categories

Resources