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

Top 5 Contributors of the Month
Post New Web Links

Inkcanvas Recognizing and replacing shapes

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :WPF
Looking for some sample code or guidance for doing the following below. Thought this would be somewhat common.....

1) Using InkCanvas to allow drawing of shapes
2) Forcing the inkcanvas/inkanalyzer to limit its recognition to specific shapes (ellipses, circle, rectangle) 
3) Replacing the drawn and recognized shape strokes with a proper shape control that has a textbpx inside the shape

(Using 2010)


View Complete Post

More Related Resource Links

replacing ok and cancel button of an alert message with YES an NO button in asp.net web application.


i want to replace ok and cancel button of an alert message with YES an NO button in asp.net web application.When a user will click yes the data will be saved in the database and if user clicks that will act as a reset button and do not save the data in database and the control will move with as usual to the redirect page.Any pointers will be highly appreciated.I am usin g C# language.

dropdownlist bound to sqldatasource adds items instead of replacing on change



I have a series of dropdownlists on webform in ASP 4.0. The first drop down is filled upon load, and then when a user selects a value from that list, it populates the second dropdown. To accomplish this, I have a SQLdatasource with a parametersource of the first drop-down list control. This works great, except when a user changes their selection from the first drop down. It performs the query, but then adds the list of items to the ones that were already there from the previous selection, instead of replacing it with the new data. Here is the code:

 <asp:DropDownList ID="ddlMajor" runat="server" DataMember="DefaultView" 
      DataSourceID="SqlDataSource1" DataTextField="majortext" 
      DataValueField="majorkey" AppendDataBoundItems="True" AutoPostBack="True">
         <asp:ListItem Value="0">Select Major</asp:ListItem>
<asp:DropDownList ID="ddlReq" runat="server" DataMember="DefaultView" 
      DataSourceID="SqlDataSource2" DataTextField="req" DataValueField="admreqkey" 
            AppendDataBoundItems="True" AutoPostBack="True">
                <asp:ListItem Value="0">Sel

Replacing with multiple words

I have a string "The quick brown fox jumps over the lazy dog" and i want to replace a few words in the string. Like "The slow red fox climbs over the sleeping dog" I have setup a table called match with 2 fields [pattern], [Replace] with some data. quick slow brown red jumps climbs lazy sleeping How could i use the replace to achieve this? Thanks

replacing " with ""

I have a string value that contains items inside single " characters.  I need to replace each instance of "  inside the string variable with "", is there an easy way to do this ?

replacing menu in a master page - Sharepoint Foundation 2010

I'm in the process of replacing a menu using Jquery and a sharepoint list.The menu data would be retrieved from webservice. But the problem i have is where to place my js menu script the master page. I tried disabling the asp: menu and the content place holders by setting visible to false and the place my div with the new menu just before the first content place holder. But i discover that any time i try and hover the menu.The hover kind of get blocked and it doesn't show. What do i need to take off and where should my js menu be place..

What is the best method for replacing natural keys with surrogates in SSIS?

The title says it all. I have dimension tables with the surrogate keys and staging tables. Currently when I'm creating the fact tables out of the staging tables I'm using subqueries in the OLE DB source select command to get the surrogates. However, this isn't possible always and updating the fact table afterwards doesn't work either without having a temp table. So, is there a way to do this with SSIS transformations?

Test when objects/shapes meet

I have included a full test routine that moves a Rectangle across the screen towards an Ellipse that increases in size.   I want to know when the Red Rectangle (mySqaure) is on the space occupied by the Ellipse (testCricle).   Knowing the centre of the Ellipse it should be possible to do this mathematically (but I am not clever enough) or is there some way to do it by pixel colour testing?   I know it is possible to get a bitmap image but feel the increasing size of the Ellipse would make this method too slow.   I would very much appreciate any assistance. Imports System.Windows.Threading Class MainWindow Public myEllipse As New Ellipse Public myLabel As New Label Public mySquare As New Rectangle Public myDockpanel As New DockPanel Public myGrid As New Grid Public myCanvas As New Canvas Public myStackPanel As New StackPanel Public myRectangle As New Rectangle Public testCircle As New Ellipse Public myRectangle2 As New Rectangle Public count As Integer Public distance As Integer Friend WithEvents myButton1 As New Button Public mainRectangle As New Rectangle Public myPoint As Point Public missed As Integer Public mytest As Point Public dt As New DispatcherTimer Public intI As Integer Public posy As Integer Public posx As Integer Public testy As Integer Public testx As Integer Public speed As Double Public

Replacing HTML tag on Page Load

Hi,I have  a css menu on a master page:<ul> <li id="mb_home" runat=server><a href="default.aspx">Home</a></li> <li id="mb_cars" runat=server><a href="terms.aspx">Cars</a></li> <li id="mb_faq" runat=server><a href="terms.aspx">FAQ</a></li> </ul>what i am trying to achieve is that. when any of the links is clicked. the <a href> tags are replaced by <span> tags. Is this possible? i tried playing aroung with HtmlGenericControl class but i could not solve it.Any advice will be appreciated.

Getting error messages after replacing the domain controller

Version: Sharepoint 2007 We installed new servers, including a new Domain Controller.  When I remove the old DC I start getting the following error: Error Please contact your administrator.  There was an error contacting the server. Technical information (for administrator): HTTP code 500: Internal Server Error Do I have to tell sharespoint to use a new DC somehow?

Replacing GridView Edit/Delete Buttons With Icons

Hello, is there a way to replace the autogenerated edit/delete buttons with icons instead of hyperlinks? Thanks

VS 2010 Stopped recognizing server controls

I have a zillion warning messages when I view my webform "Validation (): Element 'menu' is not supported" and every "<asp:WhatEver" tag has a green squiggly line under it.It looks like this:I'm using VS 2010 Pro, and have tried reinstalling it.

Replacing a text question in a Survey using JavaScript at runtime (document.body.innerHTML.replace)

Hi, I want to replace some of the text in a SharePoint Survey at runtime.  The idea behind that is to add a "header" or "title" to questions that are related together.  For example, let's say I have 2 related questions, a page separator, and 2 more related questions: (yes/no type of questions): Q1.  Are you between 20 and 40? Q2.  Did you went to college?   --page separator-- Q3.  J2EE Q4.  C/C++ The result on the final Survey should look like this: Tell us about you. Are you between 20 and 40?  Did you went to college?   --page separator-- Indicate what programming languages you know: J2EE C/C++ Simply, I tried to use the document.body.innerHTML.replace() in order to replace:  - Q1 with: <h2>Tell us about you.</h2>  - Q2 with ''  - Q3 with: <h2>Indicate what programming languages you know:</h2>  - Q4 with: '' Using the technique below, I added the following code in SharePoint Designer in NewForm.aspx: <asp:Content ContentPlaceHolderId="PlaceHolderTitleAreaClass" runat="server"> <script id="onetidPageTitleAreaFrameScript"> document.getElementById("onetidPageTitleAreaFrame").className="ms-areaseparator"; document.body.innerHTML = document.body.innerHTML.replace(/Q1/g,'

Move shapes with respect to others..


Hello Everyone,


I am a beginner in WPF, so this question may seem repeated..

I am working on a project where I am suppose to draw multiple blocks (attached to each other) and it should be possible to drag them.

So when I drag one shape I want other shapes to move along.. How can I do this?

P.S. I am not using XAML, but doing everything through C# code.

thanks :)

Replacing numbers from a string


I am trying to run the below but I cant get it to work. Anything that can be done here, I just want to remove all the numeric characters.

select REPLACE('abc3434343','%[^0-9]%','')

Gesture recognition on InkCanvas on XP



I'm currently developing a small app in WPF that requires gesture recognition, so I ended up using the InkCanvas. Everything works just fine on my desktop and laptop (running windows 7) but the app must run in another computer (an Asus Eee Top running windows XP). I've read that I had to install the Tablet PC SDK and the Tablet PC Recognition Pack, but I'm unable to install the Recognition pack because it complains about an unsuported OS: apparently it only suports XP up to Service pack 2, and I'm running SP3.

Are there any other alternatives?


System.Windows.Shapes.Ellipse to 'System.Windows.Media.Geometry'



is there a way to use  System.Windows.Shapes.Ellipse or other shapes where  'System.Windows.Media.Geometry' is required?

InkCanvas Clipboard



I would like to know how to copy ink canvas element to clipboard?

Right now what my application can do is copy element to ink canvas itself.

Thanks in advance.:)

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