IsEnabled="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.IsAPGCSourceFitted}"
Search This Blog
Friday, July 24, 2015
Monday, July 20, 2015
Day VB.Net Example
VB.NET > Functions > Day
Day returns the day of the month as an integer between 1 and 31.
Example
Dim today As Integer = Microsoft.VisualBasic.DateAndTime.Day(Now)
Day returns the day of the month as an integer between 1 and 31.
Example
Dim today As Integer = Microsoft.VisualBasic.DateAndTime.Day(Now)
Etichete:
VB.NET
Wednesday, June 24, 2015
C# Regex to match the words with dot
C# > Text > Regular Expressions > Split with dot
string[] substrings = Regex.Split("test.regex.dot", @"\.");
string[] substrings = Regex.Split("test.regex.dot", @"\.");
Thursday, June 18, 2015
Remove border Telerik RadGridView
Telerik > RadGridView > Remove border
radGridView1.GridViewElement.DrawBorder = false;
radGridView1.GridViewElement.GroupPanelElement.DrawBorder = false;
Etichete:
Telerik
Monday, June 15, 2015
KeyNotFoundException Collection C# Example
Collections > Generic > KeyNotFoundException
This is thrown when try to retrieve an element from a collection using a key that does not exist in that collection.Example
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("key1","value1");
try
{
string val = dict["key2"];
}
catch (KeyNotFoundException)
{
throw new KeyNotFoundException("KeyNotFoundException!");
}
Wednesday, May 20, 2015
Print PictureBox Image C# Example Using PrintDocument
C# > Print > PrintDocument
PrintDocument sends out to the printer.
Example
Print image
using System;
PrintDocument sends out to the printer.
Print image
using System.Drawing;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
printPreviewDialog1.Document = printDocument1;
printPreviewDialog1.ShowDialog();
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(pictureBox1.Image, 100, 100, 700, 600);
}
}
}
}
}
}
Etichete:
c#
Tuesday, May 19, 2015
Subscribe to:
Posts (Atom)