Free WinForms image editor control - c#

There are a lot of image editors in C#, but I need only the control, that encapsulates the editing and that I can place on my own host form.
Does anyone know of any such controls?

I got answer refer this
http://web.archive.org/web/20150302041833/http://www.codeproject.com/Articles/22776/WPF-DrawTools
This article describes the program that allows one to draw graphic objects on a WPF window using the mouse and certain drawing tools. The program supports the following tools: rectangle, ellipse, line, pencil and text. My first DrawTools article shows how to do this using Windows Forms. In the WPF version, I implemented a number of additional features requested by previous article readers:
Text tool XML serialization Drawing overlays on a background image Printing Zoom
Most of the requirement is completed by this reference
EDIT: As of 08/09/2015 the linked article was removed from http://www.codeproject.com

Related

How can I display a dynamically generated image on top of Bing Maps WPF control?

I've been searching for a bit on how I can display scalable media on top of a WPF Bing Maps MapControl, but I cannot find any example code or a solid solution to my problem.
Here is the control documentation:
https://learn.microsoft.com/en-us/previous-versions/bing/wpf-control/hh750210(v=msdn.10)
I'm generating a grid that represents a density map, which then becomes a bitmap image. This is fine, I have the image. How can I overlay this image onto the map with some transparency such that the user is able to move and scale the map if necessary?
My initial thought is to create a tile layer and add it to the map control since I know the size of each square and its lat/long, but there doesn't seem to be many examples of anyone doing this online. The documentation is somewhat scattered as well, and more heavily focused on UWP:
This appears to be exactly what I need, but it is a UWP control - https://learn.microsoft.com/en-us/windows/uwp/maps-and-location/overlay-tiled-images#overlay-tiles-from-local-storage
This also appears to be useful but only has XAML code, no actual C# showing what the buttons do...
https://learn.microsoft.com/en-us/previous-versions/bing/wpf-control/hh868033(v=msdn.10)
Okay, the next thought was to make the image, then scale it appropriately and overlay the media onto the map using this documentation, but again, only XAML code is shown as an example. https://learn.microsoft.com/en-us/previous-versions/bing/wpf-control/hh868032(v=msdn.10)
Has anyone done something like this in WPF? I'm a bit lost.
Thank you.

C# WPF: Blurred Text

I am new to C# WPF and working on somebody else's code.
(WPF version 3.0.6920.5011, as read from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup\Windows Presentation Foundation)
I already gave a look to various (quite old) Stackoverflow solutions, but they don't seem related to this problem: WPF Blurry fonts issue- Solutions, Text is blurred when transformed in WPF.
WPF: Why does text and elements blur if I use dropshadow effect on a parent item looks interesting, but there are no shadows applied to parents.
I observe this "blur" effect whenever an element is included in another one, and it is more and more visible as the inclusion goes deeper:
Device tab's text is perfectly readable
Global, Common and Inputs tabs' texts are lightly blurred
Pane inside Inputs is highly blurred.
Alas I cannot provide XAML files because of company rules, but there are no settings about ClearType, applied shadows nor to blur effects.
Is there anything else I could check?
Thank you in advance
Add this to your top-level <Window> tag:
TextOptions.TextFormattingMode="Display"
This was first announced 10 years ago in a Microsoft post, it's amazing how to this day so few people use it.

Embed button control into existing Direct3D application

I would like to overlay own content above a Direct3D v9 game (made by a third party).
Overlay Interactive Button
Specifically, I would like to overlay a clickable button control, like Steam does, for instance, though I'm attempting a much simpler interface.
Ideally, I would be able to overlay a WPF button or a Windows Form button or whole UserControl, but if that is not possible then creating a functioning button from primitives would suffice as well.
Text Overlay Working with SharpDX
I have a working sample of overlaying text based on the work of Justin Stenning
Namely with the help of SharpDX.Direct3D9.Font DrawText method
How to Overlay a Button or UserControl with SharpDX
I looked through relevant samples in https://github.com/sharpdx/SharpDX-Samples but was not able to find a way to include or draw native controls with SharpDX
Is it possible?
If not, are there any samples of drawing a clickable button from scratch?
Please bear in mind I'm a novice in the DirectX world :)
Your biggest problem isn't going to be getting the controls to render on top of a DX scene; it's going to be getting them to respond to input afterwards. You can probably rig up a way to get the visuals copied to a DX surface, but I have no idea how you would capture input, translate it, and deliver it back to the WPF components. If it's even possible, it's almost certainly more trouble than it's worth.
There are a couple game-oriented Xaml solutions out there that you may want to check out. WPF for Games is a partial C++ implementation of WPF based on Direct3D, and there's also the proprietary Noesis GUI.

Non-Square Icon on Windows Form?

Is it possible to display an icon in the top left corner of a Windows Form that is a different shape than the standard 16X16 pixel icon?
It appears that Skype has an icon that is much wider than standard:
Is it possible in a Windows Forms app?
You can do this but it's probably more effort than it's worth just to have a larger icon.
Hans has posted an article that roughly points to the information needed to figure out an answer this question, but hasn't posted an answer itself and so I'll clarify.
The old (pre Vista) way to do this is to override the WndProc method on your form and handle the WM_NCPAINT message. Note that this means that you are now responsible for drawing the entire window frame (the window border, title, close / restore icons etc...), not just the icon - i.e. this is a lot of effort to do a relatively minor thing.
The newer (post Vista) way to do this is to use the DWM API - note that this API is not directly exposed through the .Net Framework and so you need to use P/Invoke for this in C#. The bit that you want to do is the section titled "Drawing in the Extended Frame Window", where you extend the area that you are responsible for drawing outside of the normal client area and into the window frame. This is less hassle than it used to be (you don't have to draw things like the close buttons), however still means that you take responsibility for a lot of things that you wouldn't normally, like hit-box testing for resizing and moving.
Basically its nowhere near as simple as providing a larger icon and for most applications its probably way more effort than its worth, however you can do this in C# and that article should get you started if you really want to give it a try.
I know your looking for a plain code way to do this, but I invite you to check out DevExpress manged (yes it's third party forgive me), just google it.. I seen this thread and I started asking questions at devexpress with support and got some impressive results that you might be interested in.
Here is the ticket I put in... http://www.devexpress.com/Support/Center/Issues/ViewIssue.aspx?issueid=Q399941
Here is the result... http://www.devexpress.com/Support/Center/GetSCAttachment.ashx?id=684270b5-faed-415e-9010-64338523f8cf
So Far I used this on Xp, Vista and Windows 7 without problems using winforms only.
I hope this helps or gives you another option if the windows API don't pan out like you want on different versions of windows.
Thanks,
David
Don't think it's an icon, if you mean precisely the ICO image format.
Considering the Skype window is definitely ownerdraw window, that image can potentially be whatever you want format.
The trick is, basically, render an image skipping the pixels of some color (background color) of the "icon", so render it in "transparency".
This article can give you a hint:
Drawing Transparent Images and Shapes using Alpha Blending
It's old, but always a good one.
Yes. Override WndProc and implement WM_NCPAINT.

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