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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

a multi-touch problem for listbox

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :WPF
we know it support the multi-touch in WPF4, and we know if SurfaceListBox's SelectionMode is Multiple, when user touch two items, two surfaceListBoxItem will be selected. but I try it in the listbox, find it is only select a item, not two item. Can you tell me how to implement it? thanks. 

View Complete Post

More Related Resource Links

UI Frontiers: Multi-Touch Manipulation Events in WPF


Multi-touch has progressed from being a futuristic prop of sci-fi films to a mainstream means of user interface. We'll show you how support for multi-touch in Windows 7 has filtered down and settled into various areas of the .NET Framework.

Charles Petzold

MSDN Magazine August 2010

Finger Style: Exploring Multi-Touch Support in Silverlight


Touch isn't just a form of mouse input in Silverlight: Sometimes what's required are controls specialized and optimized for touch.

Charles Petzold

MSDN Magazine March 2010

Having problem accessing multi-choice parameter in SQL Query in Report.

Hi, I have a report with a multi-choice input parameter. My report contains a dataset that uses CHARINDEX on this multichoice parameter. The dataset query is in text, not in stored procedure. When I run the report I get "the charindex requires 2-3 arguments the reason being that the SQL is run as follows (You can see the multi-choice list screws up the string: exec sp_executesql N'Select test.Region [Region], test.Location [Location], nvarchar3 [Year], nvarchar4 [StatisticType], nvarchar5 [StatisticType2], ntext2 [Detail], float1 [Amount]   from [WSS_Content].[dbo].[AllUserData] UD   inner join [WSS_Content].[dbo].[AllLists] AL on AL.tp_ID = UD.tp_ListId and AL.tp_Title=''Statistics''   left outer join   (       Select UD.tp_id [ID],nvarchar1 [Region],     nvarchar3 [Location]   from [WSS_Content].[dbo].[AllUserData] UD   inner join [WSS_Content].[dbo].[AllLists] AL on AL.tp_ID = UD.tp_ListID and AL.tp_Title=''Regions''   where UD.tp_ListId = AL.tp_ID   and UD.tp_ListId = AL.tp_ID   and UD.tp_DeleteTransactionId = 0x0   and tp_IsCurrentVersion = 1   ) test on test.id = UD.int1   where UD.tp_ListId = AL.tp_ID   and UD.tp_ListId = AL.tp_ID   and UD.tp_DeleteTransactionId = 0x0   and tp_IsCurrentVersion = 1  &n

asp.net mvc multi button on same page problem

On my employee edit view page i have 3 buttons Save,Cancel,Delete.Save - saving view page values. calling controller action.Cancel - Go back to previous view page. (List of employee page. where this page view comes)Delete - Delete current page employee and go back to List of employee page. where this page view comes.Save button click by default working for me calling controller.but when i click cancel and delete button same controller gets callHow to handle this situation on page view.

Problem when adding items to a listbox from different threads


I have an application in which different threads add items to a listbox throughout the application's execution (not at startup). But when one of the threads tries to add an item to the listbox, a System.InvanlidOperationException is thrown and the error message is: "The calling thread cannot access this object because a different thread owns it." (In my scenario the "calling thread" is one of the worker threads that add items to the listbox, and the "different thread" is the UI thread.)

So basically I just need a simple way to allow the threads to share the listbox object, or, failing that, some other workaround.

ListBox object Binding Problem...?


hii guy's

i created a ListBox and i added Engine Class object into it...so i wana display Engine Class property "Name" into ListBox..so plz tell me how can i add property name of "Name" to ListBox of Class "Engine"





Pass Multi-Value parameters to Stored Procedure problem



I am trying to pass multi-value parameters to stored procedure to filter data, but seems it does not work.

Stored procedure:


ALTER PROCEDURE [dbo].[test]

@StartDate DateTime,
@EndDate DateTime,
@FirstName varchar(8000),
@LastName varchar(8000),
@Location varchar(8000),

SELECT [Item No_],[Sales Staff],[Location Code],[Date],
[Price],[Quantity],[Item Category Code],[Product Group Code]FROM [Trans Sales Entry]
cte2 as
SELECT [ID],[First Name],[Last Name] FROM Sta

ListBox Object Binding Problem..??


hii guy's here i'm having small problem on Object DataBinding using ListBox.. i've a WCF class like..

	public class EngineInstanceStatus 
             public string Name
				return m_name;

so i wana add dis class object to my ListBox.. den it'll display its property name "Name" in ListBox whenever i added this class object ot ListBox..

so plz tell me with sample how can i do this one..



UI Frontiers: Multi-Touch Inertia


One of the ways in which a multi-touch interface attempts to mimic the real world is by introducing inertia. We'll show you how easy this is to duplicate in your own WPF apps.

Charles Petzold

MSDN Magazine October 2010

Login problem with multi website on a server.


I write 2 websites and deloy on a server, they're difference folder. A problem when I login on a website, then open 2nd site I see login cookie still keep in 2nd site. My system: Window server 2003, .Net 2.0, IIS. 

Login code:

FormsAuthentication.SetAuthCookie(dataUserName.Text, true);   


<authentication mode="Forms" >
<forms loginUrl="~/Login.aspx" timeout="2880"/>

Multi-select Listbox to ItemInsert



I have a DetailsView that send values to a stored procedure using the built in Insert button/function. The parameters is passes are mostly text boxes and DropDown menus which all work fine, but I also have two listboxes. The first listbox lists all available servers, from which the user can select multiple items and then move these across into a second listbox using add and remove buttons. The selected servers should then be passed through to the stored procedure as one comma delimited string. The parameters are also used by a second form that confirms what the user has input into the database.

 I am using Request.Form(ListBox2.UniqueID) to retrieve the comma separated string from the values in the second list box, however I am having difficulty passing this value though to the stored procedure.

Below are the two bits of code I think are relevent - I can post all the code if required:


  Protected Sub btnMoveRight_Click1(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim ListBox1 As ListBox = TryCast(DetailsView1.FindContro

Problem loading WPF listbox using Entity Framework

I have downloaded the VB sample code per Beth Massi's presentation series per http://social.msdn.microsoft.com/Forums/en-US/vswpfdesigner/threads/. When the listbox loads, I ma getting a blank xaml page. I have updated my edmx model to point to my Sql Server 2005 instance. Would appreciate any suggestions.

Multi-threading in .NET: Introduction and suggestions

This article uses the C# type shorthands throughout - int for Int32 etc. I hope this makes it easier for C# developers to read, and won't impede any other developers too much. It also only talks about the C# ways of declaring variables to be volatile and locking monitors. Developers using other languages can find the equivalents in their own preferred environment, I'm sure.

Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

ListBox tricky to set in a DataGrid/GridView

Listboxes are very tricky to set selected items in grid - there is no real nice way to do it. It would have been great if Microsoft included a property that accepts an array or comma separated values - or anything! But they only allow each item in the list to be selected individually. The way to do this in a grid is a bit messy, but it is fairly simple to implement. When a row is created (as per the event), select the items of the listbox as per the datagrid source data:

Regrading Sharpoint 2010 problem and solutions

We can write your question and problem on this blogger.you get ans.use.

This sharpoint 2010 problem solving threads

Hi friend,

you can use this thread to solving problem and solutions.
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