Posted By: Pon | Jun 5th, 2006 @ 12:02 AM
page 1 of 1
Comments: 8 | Views: 11108
Pon
Pon

I'll ask the Image quesiton first:
How does one set an individual pixel on an image? I know one has to create a BitmapSource, but I don't know what to do from there. I need this to be as quick as possible; it's for a software 3d engine Tongue Out

Second, how do you create a hyperlink in a label that responds to events? I'm sure you all know what I mean, but I can't explain it well lol.
littleguru
littleguru
<3 Seattle

Does WPF no longer have the LinkLabel control?
I heard once that you need to apply a filter on the bitmap source... but I haven't done anything with WPF yet... somebody mentioned that in a video on Channel 9.

mawcc
mawcc
Make it so
Regarding the hyperlink try something like this:

<TextBlock>Click <Hyperlink NavigateUri="http://channel9.msdn.com">here</Hyperlink></TextBlock>

At least this works in WPF Web Browser Applications. I couldn't get HTTP-Links to work in WPF Windows Applications. In this case you might want to add a Click-Handler to the Hyperlink and open the URL using

System.Diagnostics.Process.Start( "http://channel9.msdn.com" );

littleguru
littleguru
<3 Seattle
mawcc wrote:
Regarding the hyperlink try something like this:

<TextBlock>Click <Hyperlink NavigateUri="http://channel9.msdn.com">here</Hyperlink></TextBlock>

At least this works in WPF Web Browser Applications. I couldn't get HTTP-Links to work in WPF Windows Applications. In this case you might want to add a Click-Handler to the Hyperlink and open the URL using

System.Diagnostics.Process.Start( "http://channel9.msdn.com" );



Ah yes. This makes a lot more sense. We should think more to nest controls. This is more XML and nesting now Smiley
footballism
footballism
Another Paradigm Shift!
Pon wrote:
I'll ask the Image quesiton first:
How does one set an individual pixel on an image? I know one has to create a BitmapSource, but I don't know what to do from there. I need this to be as quick as possible; it's for a software 3d engine Tongue Out


I've posted a sample in the following MSDN WPF forum thread on how to manipulate pixels in WPF (with a bit of WPF/GDI+ interop code):
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2424599&SiteID=1

Pon wrote:

Second, how do you create a hyperlink in a label that responds to events? I'm sure you all know what I mean, but I can't explain it well lol.


Hyperlink is "navigation service" aware, which means it can work properly as you expect in navigation application(using NavigationWindow, Frame which can provide navigation service).

In standalone non-navigation application, you can hook up to its Click event, and implement the navigation logic there.

PS: If you have any more question on WPF, you can ask questions in MSDN WPF Forum.

I am moderator there, and will always be ready to help:)
footballism wrote:
I am moderator there, and will always be ready to help
you said it Tongue Out btw sience when, do you work for MS or something? looks like... yes Smiley
footballism
footballism
Another Paradigm Shift!
Ion Todirel wrote:

footballism wrote:I am moderator there, and will always be ready to help
you said it btw sience when, do you work for MS or something? looks like... yes


Yes, sort of work for them. They offer me a vendor position and ask me to manage the MSDN WPF forum:)


page 1 of 1
Comments: 8 | Views: 11108
Microsoft Communities