Click here to Skip to main content
15,879,326 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: drag image Pin
Mark Salsbery5-Nov-09 11:20
Mark Salsbery5-Nov-09 11:20 
QuestionKiosk Application Pin
Tiger4563-Nov-09 2:08
Tiger4563-Nov-09 2:08 
AnswerRe: Kiosk Application Pin
Christian Graus3-Nov-09 9:48
protectorChristian Graus3-Nov-09 9:48 
GeneralRe: Kiosk Application Pin
Tiger4563-Nov-09 21:53
Tiger4563-Nov-09 21:53 
GeneralRe: Kiosk Application Pin
Pete O'Hanlon3-Nov-09 22:20
mvePete O'Hanlon3-Nov-09 22:20 
GeneralRe: Kiosk Application Pin
#realJSOP3-Nov-09 23:34
mve#realJSOP3-Nov-09 23:34 
GeneralRe: Kiosk Application Pin
Pete O'Hanlon4-Nov-09 1:24
mvePete O'Hanlon4-Nov-09 1:24 
GeneralRe: Kiosk Application Pin
Tiger4568-Nov-09 17:40
Tiger4568-Nov-09 17:40 
GeneralRe: Kiosk Application Pin
Christian Graus4-Nov-09 10:08
protectorChristian Graus4-Nov-09 10:08 
GeneralRe: Kiosk Application Pin
Mark Salsbery5-Nov-09 12:57
Mark Salsbery5-Nov-09 12:57 
QuestionCall MVC controller method in SIlverlight with params Pin
Deabdy211-Nov-09 22:53
Deabdy211-Nov-09 22:53 
AnswerRe: Call MVC controller method in SIlverlight with params Pin
Xodiak21-Jun-10 15:18
Xodiak21-Jun-10 15:18 
QuestionHow to send mail [Error: The SMTP server requires a secure connection or the client was not authenticated] Pin
Nekkantidivya1-Nov-09 19:24
Nekkantidivya1-Nov-09 19:24 
AnswerRe: How to send mail [Error: The SMTP server requires a secure connection or the client was not authenticated] Pin
Mark Salsbery2-Nov-09 8:44
Mark Salsbery2-Nov-09 8:44 
AnswerRe: How to send mail [Error: The SMTP server requires a secure connection or the client was not authenticated] Pin
earlgraham6-Nov-09 9:41
earlgraham6-Nov-09 9:41 
Questioncentering cursor and object Pin
sadas232341s1-Nov-09 7:57
sadas232341s1-Nov-09 7:57 
I' m building a sample in which I want to move an object. I'm not fully familiar with Blend and Xaml and the C# code behind, but I really don't understand why my cursor is far away from the object (is it canvas?... I don't know, in fact I'm shooting in the dark).

Here' s my xaml:

<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="CanvasMove.MainPage"
	Width="640" Height="480">

	<Grid x:Name="LayoutRoot" Background="White">
		<Canvas Height="80" HorizontalAlignment="Left" Margin="100,100,0,0" VerticalAlignment="Top" Width="80">
			<Rectangle Fill="#FF80C1E4" Height="80" Width="80" RenderTransformOrigin="0.5,0.5" MouseLeftButtonUp="CanvasUp" MouseLeftButtonDown="CanvasDown"/>
			<Rectangle Fill="#FF7AB7D8" Height="32" Width="32" Canvas.Left="24" Canvas.Top="24"/>
				<Canvas.RenderTransform>
					<TranslateTransform X="0" Y="0" x:Name="CanvasTransform"/>
				</Canvas.RenderTransform>
		</Canvas>
	</Grid>
</UserControl>


Here's my C#:

protected override void OnMouseMove(MouseEventArgs e)
{
        base.OnMouseMove(e);

        CanvasTransform.X = e.GetPosition(null).X;
        CanvasTransform.Y = e.GetPosition(null).Y;
}

AnswerRe: centering cursor and object Pin
Mark Salsbery1-Nov-09 11:16
Mark Salsbery1-Nov-09 11:16 
GeneralRe: centering cursor and object Pin
sadas232341s1-Nov-09 20:17
sadas232341s1-Nov-09 20:17 
GeneralRe: centering cursor and object Pin
Mark Salsbery2-Nov-09 8:27
Mark Salsbery2-Nov-09 8:27 
GeneralRe: centering cursor and object Pin
sadas232341s3-Nov-09 21:32
sadas232341s3-Nov-09 21:32 
QuestionHow can I determine if content fits control? Pin
fjparisIII31-Oct-09 16:01
fjparisIII31-Oct-09 16:01 
AnswerRe: How can I determine if content fits control? [modified] Pin
#realJSOP1-Nov-09 1:03
mve#realJSOP1-Nov-09 1:03 
GeneralRe: How can I determine if content fits control? Pin
fjparisIII1-Nov-09 4:40
fjparisIII1-Nov-09 4:40 
GeneralRe: How can I determine if content fits control? Pin
#realJSOP1-Nov-09 6:02
mve#realJSOP1-Nov-09 6:02 
GeneralRe: How can I determine if content fits control? Pin
fjparisIII1-Nov-09 6:40
fjparisIII1-Nov-09 6:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.