Skip to main content

Posts

ScrollViewer Overview

ScrollViewer Overview .NET Framework 3.5 Other Versions Content within a user interface is often larger than a computer screen's display area. The   ScrollViewer   control provides a convenient way to enable scrolling of content in Windows Presentation Foundation (WPF) applications. This topic introduces the   ScrollViewer  element and provides several usage examples. This topic contains the following sections: The ScrollViewer Control Physical vs. Logical Scrolling Defining and Using a ScrollViewer Element Styling a ScrollViewer Paginating Documents Related Topics The ScrollViewer Control There are two predefined elements that enable scrolling in WPF applications:   ScrollBar   and   ScrollViewer . The   ScrollViewer   control encapsulates horizontal and vertical   ScrollBar  elements and a content container (such as a   Panel   element) in order to display other visible elements in a scrollable area. You must build ...

LinQ Database Update Operations In C#

Recently, I have discussed about getting started linq to sql in c#.net. That articles also covered for creating select query for retrieving both single and multiple results. Today, in this tutorial, I will try to give some more examples on other types of database operations, that writes/updates the database. These will cover writing and executing 'Update'/'Insert'/'Delete' query in the proper way. Please use the database structure given below, if you want to try the following examples directly. I am assuming, you already know how to create dbml/linq to sql classes: Example DBML To be used In this tutorial Insert Data With Linq: Being LinQ as an ORM, its quite easy and sql syntax free way to insert data using LinQ. We just need to create a new object of corresponding database table type, then add it to the DataContext object and then commit the changes. Here is a small block of c# code samples to create new 'User' linq to sql class(Representin...

Beginning LinQ To SQL In C#.NET

In this tutorial, I will discuss about basic linq to sql overview, then how to get started very quickly with its usage on our C#.NET based applications(This can be used in both desktop and web applications in the exactly same way). Besides, I will also discuss about using 'select' query in linq to retrieve data and also traverse through the query results(in case of multiple result objects). To understand this tutorial properly, You should have handy knowledge on c# and also have visual studio 2008+(.NET Framework 3.0+ ) to successfully able to run LINQ To SQL examples . What Is LINQ To SQL? Full meaning of LINQ is ' L anguage In tegrated Q uery', which replaces the traditional sql query execution process. Moreover, it doesn't only applicable to manipulate database results, but it can also be used to manipulates array/list collections. LinQ was released as part of the .NET framework 3.0 and can be used from languages supported by .NET framework like C#, V...

LINQ to SQL and Visual Studio 2008

Introduction LINQ is one of the hottest buzz words out there today. LINQ is the new query language that can query any collection-based mechanism, whether it's an enumerable collection, XML, or a database . LINQ uses a structure very similar to an ANSI SQL query, with the select statement at the bottom instead of the top. The purpose of this article isn't to discuss LINQ queries (although it will to a point), but to discuss LINQ to SQL capabilities in the Visual Studio 2008 designer. When looking at LINQ, pay attention to the System.Linq, System.Data.Linq, and the System.Xml.Linq namespaces for all of your data querying needs. The System.Data.Linq namespace has a lot of the core objects used with LINQ-to-SQL, and System.Linq has the extension methods and lambda expressions that make querying data even easier. Visual Studio 2008 Support I'm sure, unless you are new to .NET, that you are familiar with the code generation capabilities of .NET data storage mec...