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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Drawing multiple connected lines efficiently

Posted By:      Posted Date: October 10, 2010    Points: 0   Category :WPF
 

Hi 

 

As a beginner I recently wrote a spectrum analyzer in win-forms which runs nicely. Now, I'm realizing that I would be better of doing the application in WPF - which I know very little about.

 

I do have a WPF project running now where one line is changing coordinates over time. Like this:

 

            // Add a Line Element

            Line myLine = new Line();

 

            myLine.Stroke = System.Windows.Media.Brushes.LightSteelBlue;

            myLine.HorizontalAlignment = HorizontalAlignment.Left;

            myLine.VerticalAlignment = VerticalAlignment.Center;

            myLine.StrokeThickness = 2;

 

            myLine.X1 = 0;

            myLine.X2 = x++;

            myLine.Y1 = 0;

            myLine.Y2 = y++;

 

            canv.Children.Add(myLine);


But how can I draw a


View Complete Post


More Related Resource Links

WPF - Drawing the connected lines shape

  
I want something to draw like in WPF   ___________________________                                        |                                        |                                        | __________________________ | | | ___________________________                                         |                                         |                                         | ___________________________          

Multiple selection in connected list view webpart

  
Hi all, I have a webpart page with 2 listview webparts connected via  ("Send Row of Data"/"Get filter values from"). This connection permits me to select one row on the first listview (parent) and the second (child) gets filtered by the defined filter column. My question is how can I choose multiple rows on the parent so I can filter the rows of the child with multiple filter values? It seems on can only select one row via the "Select" column... Is there a workaround... Many thanks,  

Wrap text in Multiple Lines of text column

  
I had a List created from Calendar. I then took two copies of it to use for two slightly different purposes. I created a View on the list in both cases using the "Newsletter" style. On one of the list the Description column wraps text. In the other one it does not. Any idea what I could have done differently? Is there a checkbox in the View definition or the Column definition that toggles wrap text ?

I created a new control and im drawing some lines and points inside but the form1 designer throw me

  

This is the code of the control:

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace My_Diet_Control
{
    public partial class My_Diet_Graph_Control : UserControl
    {
        int x_axis_lenght;
        int y_axis_lenght;
        int marginLeft;
        int marginRight;
        int marginBottom;
        int marginTop;
        My_Diet_Graph_Control myControl1;
        Diet_Data myData;
        public My_Diet_Graph_Control()
        {
            InitializeComponent();
        }

        private void My_Diet_Graph_Control_Load(object sender, EventArgs e)
      &nbs

SQL Server 2008 multiple lines in a varchar(MAX) column?

  

Hi,

I'm using varchar(Max) to store a text file content. It's not taking the newline character. I tried \n and char(13) etc.. whatever solution posted in the net.

ex : update test set f='This is line 1.' + CHAR(13) + CHAR(10) + 'This is line 2.' 

after updating it doesn't have any newline or linebreak. Can anyone help me in this how to have linebreaks in the varchar(max) field.

Thanks a lot.


sql agent job command step multiple lines?

  

This is an oldie but a goodie, maybe there's a trick I haven't heard about?

When I create an OperatingSystem (CmdExec) job step, it seems to only execute the first line command. 

So if the first line is:

dtexec foo

It executes dtexec.  Fine.

But if I have two command lines:

set myvar=123
dtexec foo

It only executes the set command and never calls dtexec.  Bummer.

Now, we can work around this by executing a .cmd file, but then I have a whole issue of deploying .cmd files in different environments yada yada.

So the question is, is there any (new-ish) magic trick that will tell the SQL Agent job step to execute two or more command lines right from the job?

Thanks.

Josh

 


Adding Multiple hyperlinks to form connected to SharePoint 2010 list

  

I have a SharePoint 2010 list and am using an InfoPath 2010 form to create items. I am trying to allow users to reference other list items by inserting a hyperlink to other items in the same list. I have created a column in the list containing each items URL. I then created a drop down list in the InfoPath form that queries this column, so that it contains all the items URL’s. I also created a button and a hyperlink field in the InfoPath form. I would like the user to be able to choose an item from the drop down list, click the button and have the hyperlink inserted into the form. Then be able to choose another item from the drop down list, click the button and have another hyperlink inserted. I added a rule on the button that when clicked, sets the value of the hyperlink field to the value of the drop down item picked. This works, however, only allows for one hyperlink to be inserted.

I have also tried to use the multiple selection list box, by querying the URL column as the choices. This allows for multiple selections, however it shows up as text a

Adding Multiple hyperlinks to form connected to SharePoint 2010 list

  

I have a SharePoint 2010 list and am using an InfoPath 2010 form to create items. I am trying to allow users to reference other list items by inserting a hyperlink to other items in the same list. I have created a column in the list containing each items URL. I then created a drop down list in the InfoPath form that queries this column, so that it contains all the items URL’s. I also created a button and a hyperlink field in the InfoPath form. I would like the user to be able to choose an item from the drop down list, click the button and have the hyperlink inserted into the form. Then be able to choose another item from the drop down list, click the button and have another hyperlink inserted. I added a rule on the button that when clicked, sets the value of the hyperlink field to the value of the drop down item picked. This works, however, only allows for one hyperlink to be inserted.

I have also tried to use the multiple selection list box, by querying the URL column as the choices. This allows for multiple selections, however it shows up as text a

Really Long JSON String wraps to multiple lines in source, creates unterminated String Literal error

  

I have an app that writes a JSON object to a string and registers a script block onto the page that client-side javascript then uses to build interface components.  I found that the javascript is working fine when the data set is small, but on large datasets, when I view the source, the JSON object string takes up a few lines because it is so long.  I didn't think anything of it until I started manually trying to recreate the "Unterminated String Literal Error", only to find that the error goes away when I format the JSON string to be a little more "readable".  What I discovered is that this does away with the automatic new line wrap, making the error go away. 


Make Sense?  Is there anything I can do about this?


Drop Down menu connected to Sharepoint list with multiple columns

  

Hello,

 

I have a sharepoint list with 2 columns (employee name and employee phone #).  Is there any way to have a drop down list with the employee name and then right next to it have a text box show the employee telephone number?  i.e. if I choose my name from the drop down list, my phone number will show up right next to my name.  Thanks!

 

Kyle


What is the most efficient way to filter on detail lines and have multiple detail lines displaying o

  

Hello:

Here is my dilemma - i have 10 different sizes of, let's say, Tshirts in different stores.

I need a report that displays on one detail line a count of how many shirts of size 1 thru 3 i have in store A, B and C (the stores are the columns). and i need a second detail line displaying how many shirts of size 7 thru 9 i have in the same stores. How would i filter the data to display this most efficiently. Also, i will need to total the two lines at the end of the report.

Sample:

             storeA     B         C

size 1-3      15        10     12

size 7-9     23         1        5

 


Multiple Lines of text

  

Hi

I want to be able to enter multiple lines of text into a field...... but I only want the first 100 chrs to be displayed, but with a link to show the full detail.

E.g. These would be the first few chrs on test but to display the rest you need to click.....more

Is this possible in a Share Point list?

The reason i want this is to enable Issues and Problems to be recorded in a list and the list be used to manage each issue. The notes associated with each issue will build up over time but I want the list to remain easy to read. Therefore I want the full detail of the issue to be on a separate page that is available via a ....more link within the list.

 

Is this possible?

I'm using Share Point 2010


Multiple database support with Entity Framework

  
One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Binding the multiple drop down boxes in GridView using JQuery in ASP.NET

  
Here is the code for binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Upload Multiple File using JQuery in asp.net

  
In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Adding Multiple Columns and Rows in GridView without using a Database

  
This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

GridView Multiple Filter AJAX Control

  
This AJAX control enables the user to filter data within any column inside a GridView. The user can add multiple filters and can delete existing ones too.
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