.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Move, Resize, Rotate InkStrokes

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :WPF
 

Hello,


I wrote a custom InkCanvas Adorner.  It has custom Selecting, Moving, Resizing, and Rotation. It works fine with UIElements (e.g., Rectangles, Ellipses, RichTextBoxes). It can also select InkStrokes.

However, how do you (Move, Resize, and Rotate) InkStrokes using a custom adorner.

I've tried wrapping the InkStrokes inside a ViewBox and that does not work.

Is there a way, WPF Team? I know the built-in Adorner does it. But I do not have that option now that the project has requirements for custom adorning.

All the Best,

K


Office VB.NET Developer


View Complete Post


More Related Resource Links

How can i programmatically manipulate the Windows 7 on-screen keyboard osk: Move, Resize, Remove Tit

  

I'm working on an app where i want to display the built-in windows 7 onscreen keyboard in a 'always there' manner.  So i want to:

 1. Move it to a particular location

 2. Set it to a certain width and height

 3. Remove the caption/titlebar so the user can't move it around or close it

 4. Remove that abilty to resize it (or any other user adjustments for that matter).

Basically it just permanently sits there.  I've tried all the typical API functions (MoveWindow, SetWindowPos, SetWindowLong, etc...) but it refuses to work.  Code currently works with all other processes and apps (such as internet explorer and the command prompt); it's almost as if you can't apply anything to the osk.  What am i missing?  Thanks in advance.

 

 

 

 



resize png at time of uploding without loosing tranparancy of img

  

 

i have tryed so many code to resize n compress png img but after resize it loose it's tranparancy ,

any one have good code to fix this problem.



Bad quality after resize jpeg

  

Hi,

I wrote code that resize my photo to thumbnail (100x100px). The thumbnail is ok (is blur) on serwer (Windows Serwer 2008 x64) and the thumbnail is very bad (no blur and pixels are big) on serwer (Windows Serwer 2008 x86). Both serwers have framework .net 4.0.

I wrote code on VS 2010.

Below is my code:

public static void MakeThumbnail(string path, string prefix, string filename, Stream stream, string mime, int fixedWidth, int fixedHeight, bool allowCrop)
{
string newFullname = path + "\\" + prefix + filename;

//oryginalny obrazek
Image sourceOriginalImage = Image.FromStream(stream);

int width = sourceOriginalImage.Width;
int height = sourceOriginalImage.Height;

double widthD = Convert.ToDouble(width);
double heightD = Convert.ToDouble(height);
double fixedWidthD = Convert.ToDouble(fixedWidth);
double fixedHeightD = Convert.ToDouble(fixedHeight);

int newWidth = 0;
int newHeight = 0;

int cropX = 0;
int cropY = 0;

newWidth = fixedWidth;
newHeight = (int)(fixedWidthD / Xp);
cropY = Convert.ToInt32((newHeight -

Problem with Resize on x64/x86

  

Hi,

I wrote code that resize my photo to thumbnail (100x100px). The thumbnail is ok (is blur) on serwer (Windows Serwer 2008 x64) and the thumbnail is very bad (no blur and pixels are big) on serwer (Windows Serwer 2008 x86). Both serwers have framework .net 4.0.

I wrote code on VS 2010.

Below is my code:


public static void MakeThumbnail(string path, string prefix, string filename, Stream stream, string mime, int fixedWidth, int fixedHeight, bool allowCrop)
{
string newFullname = path + "\\" + prefix + filename;

//oryginalny obrazek
Image sourceOriginalImage = Image.FromStream(stream);

int width = sourceOriginalImage.Width;
int height = sourceOriginalImage.Height;

double widthD = Convert.ToDouble(width);
double heightD = Convert.ToDouble(height);
double fixedWidthD = Convert.ToDouble(fixedWidth);
double fixedHeightD = Convert.ToDouble(fixedHeight);

int newWidth = 0;
int newHeight = 0;

int cropX = 0;
int cropY = 0;

newWidth = fixedWidth;
newHeight = (int)(fixedWidthD / Xp);
cropY = Convert.T

Easy image processing(grayscale, sepia, negative, resize, brightness, contrast and opacity)

  
Howdie y'all,

I see a lot of questions in this forum about resizing images. Recently I created a code sample(with downloadable webapp), right here.

The class (downloaded or created) allows for very fast and easy processing of your images. And a lot of problems over here can be solved by simply using that class. I thought it might help to mention the code sample in this forum as well.

Cheers,

Wes

Editor's Note: A Look Back As We Move Forward

  

Here's a look at a year's worth of coverage and changes at MSDN Magazine in response to reader requests.

Howard Dierking

MSDN Magazine January 2009


GridView: Move Over DataGrid, There's a New Grid in Town!

  

When incorporating the ASP.NET DataGrid control into your Web apps, common operations such as paging, sorting, editing, and deleting data require more effort than you might like to expend. But all that is about to change. The GridView control--the successor to the DataGrid-- extends the DataGrid's functionality it in a number of ways. First, it fully supports data source components and can automatically handle data operations, such as paging, sorting, and editing, as long as its bound data source object supports these capabilities. In addition, the GridView control offers some functional improvements over the DataGrid. Here DataGrid expert Dino Esposito introduces the GridView and explains all its long-awaited features.

Dino Esposito

MSDN Magazine August 2004


C++ -> C#: What You Need to Know to Move from C++ to C#

  

C# builds on the syntax and semantics of C++, allowing C programmers to take advantage of .NET and the common language runtime. While the transition from C++ to C# should be a smooth one, there are a few things to watch out for including changes to new, structs, constructors, and destructors. This article explores the language features that are new to C# such as garbage collection, properties, foreach loops, and interfaces. Following a discussion of interfaces, there's a discussion of properties, arrays, and the base class libraries. The article concludes with an exploration of asynchronous I/O, attributes and reflection, type discovery, and dynamic invocation.

Jesse Liberty

MSDN Magazine July 2001


'Meter number is not registered ' error FedEx ship web service move to production

  

Hi,

I want to integrate FedEx ship web service in my website. It works fine for local but for production it gives error. I changed test credentials by production credentials. also changed test url "https://gatewaybeta.fedex.com:443/webservices" by production url "https://gateway.fedex.com:443/webservices" But I am getting error that meter number is not registered. Please advice.


Unable to move Wiki pages with Bracketed ([[, ]]) Links

  
Hello,

I'm using Microsoft Office Sharepoint Server 2007 (pre-SP1) to host a Wiki, and it's been a learning process as I've been going along.  In this process, I keep finding better places to keep Wiki Pages and Wiki Libraries, so I move things around to find the best fit.  I've run into a strange problem while moving my collection of ~100 Wiki pages, and I'm curious to see if others have it to.  The problem is, I cannot move or copy Wiki Pages that contain links to other Wiki pages using the bracket method (of writing a link as [[other page]]).


Here's how I reach the problem:

-Create 2 Wiki Pages Libraries,  I called mine Wiki PagesA and Wiki PagesB
-I go into my Wiki PagesA library and create a new Wiki page.
-I call it "linktohome" and enter only a single line in the body, "[[home]]"
-I can open it up and it works just fine and the link redirects me to the Home page in the local Wiki PagesA library so it's all good.
-Next in my main Site Collection that's hosting these libraries, I'll pull down Site Actions and go into Manage Content and Structure.
-I can browse into Wiki PagesA and the linktohome document appears
-But, when I try to copy (or move) linktohome to Wiki PagesB library I get an error that says:

Unable to copy/move wiki pages with links to other wiki pages

  
When I try to copy or move wiki pages from one 'Wiki library A' to 'Wiki library B' through 'content and structure', I get an error for the pages which contain links to other wiki pages, does sameone has a clue how to fix this:

<error><message>Het item bestaat niet. Mogelijk is het door een andere gebruiker verwijderd.</message><full>Microsoft.SharePoint.SPException: Het item bestaat niet. Mogelijk is het door een andere gebruiker verwijderd. ---&gt; Microsoft.SharePoint.SPException: Het item bestaat niet. Mogelijk is het door een andere gebruiker verwijderd. at Microsoft.SharePoint.SPListItem.EnsureItemIsValid() at Microsoft.SharePoint.SPListItem.PrepareItemForUpdate(Guid newGuidOnAdd, Boolean bMigration, Boolean&amp; bAdd, Boolean&amp; bPublish, Object&amp; objAttachmentNames, Object&amp; objAttachmentContents, Int32&amp; parentFolderId) at Microsoft.SharePoint.Deployment.ListItemSerializer.AddOrUpdateDoclibItem(SerializationInfoHelper infoHelper, SPListItem&amp; listItem, SPWeb web, Guid newId, String&amp; listItemServerRelativeUrl, Boolean bIsPublish, Boolean exists, StreamingContext context, ISurrogateSelector selector, ImportObjectManager objectManager) at Microsoft.SharePoint.Deployment.ListItemSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurr

Can't start crawl becasue of index move operation

  

Hi there,

I can't start crawl task. The log says that "Deleted by the gatherer (The start address or content source that contained this item was deleted and hence this item was deleted.)" But I did not change the path of content sources and When I trie to start crawling job it says "Crawling might be paused because a backup or an index move operation is in progress. Are you sure you want to resume this crawl?"

What is index move operation? What should I do? I'll really appreciate the solution greatly. Thanks in advance.

 


allan

Invalid URL"" after copy or move a document.

  

Hi,

We have an website that have 3 libraries. The "first Library" is used only to edit documents and it's called "my documents". When a user finish of edit your documents here, they start a workflow that will check fields in the document and move the document for the second library (using Sharepoint Designer Workflow - without custom actions).
In "second library" we have a big workflow. This WF has some steps for approve, collect feedback, generate sub-tasks and others things related for the document. This WF use many custom actions in (Sharepoint Designer).
When this WF arrives to the end, the document is moved to "third library", that is a official repository of documents in the enterprise.
The entire cycle works fine. But when someone creates a internal copy of the document in the "first library" to begin again the flow, we receive a Invalid Url error. It occurs when any update operations is executed over the document item, the value is conserved but the error is displayed. After it, we can not execute other workflows over the item.
If we save the document in local disk, delete the library item, and then upload it again, the problem is solved.

Some one have an idea about why and how solve it?  We are using WSS 3.0.

The following is an error registred in log file when you d

How to use arrow keys to move from textbox to textbox in VB ASP.NET

  

  I am totally new at this.  For my example I have TextBox1, TextBox2, TextBox3, TextBox4.  They are situated right to left top TextBox1 TextBox2 and bottom TextBox3 TextBox4.  You are currently sitting on TextBox1.  Question: is there a way to use the arrow keys to move between these four textboxes?  If so, could you either point me to how to code it or give me the code to code it.  So in my example pressing the arrow down key would move you from TextBox1 to TextBox3.  Pressing the arrow right key would move you from TextBox1 to TextBox2. So on and so forth.

  Thank you for your time and consideration.


Trying to move FK links from list as columns to my navigation area.

  

Hello,

I'm using vs2010, EF. I have a left column simular to a navigation area and I'm trying to figure out a way to display the FK links that appear at the end of a list as columns, in my navigation area.  One thought was to place a duplicate table in the navigation area and hide all the columns except for the FK links. Is there an easier way to accomplish this.

Thanks, Jeff

 


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend