Instantly share code, notes, and snippets.

View ResizeDialoghost.xml
<Style x:Key="dialgoResisze" TargetType="{x:Type ContentControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContentControl}">
<Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
<ContentPresenter Content="{TemplateBinding Content}"/>
<Control x:Name="Top">
<Control.Style>
<Style TargetType="{x:Type Control}">
<Setter Property="Template">
View InfiniteScrollViewer.cs
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Markup;
[assembly: XmlnsDefinition("http://codingsack.com/wpf/InfiniteScrollViewer", "InfiniteScrollViewerControl")]
[assembly: XmlnsPrefix("http://codingsack.com/wpf/InfiniteScrollViewer", "cs")]
namespace InfiniteScrollViewerControl
{
View MainViewModel.cs
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
namespace WpfChoosenControlDemo
{
public class MainViewModel : ViewModelBase
{
private ObservableCollection<Student> _items;
private List<Student> _selectedItems;
View PDFConverter.cs
public class PDFConverter
{
/// <summary>
/// it will Convert HTML Code into PDF
/// </summary>
/// <param name="htmlCode">HTML Code</param>
/// <param name="wkhtmlToPdfExePath">wkhtmlToPdf Exe file Path</param>
/// <returns></returns>
public byte[] Convert(string htmlCode, string wkhtmlToPdfExePath)
{
View ImageCroperHandler.ashx.cs
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Routing;