Archives
-
Silverlight Tip: Splash screen issues.
Today I worked on silverlight splash screen for our site and found that documentation about splash screen is very poor and cause many misunderstandings. In this post i'll try to make some of them disappear. =)
-
Little trick with partial classes.
If you have ever look at silverlight control toolkit source you may be found that all visual states and visual state groups are stored as constants in one internal static class called visualstates.
-
Resharper live template for Dependency Properties
Writing of Silverlight and WPF dependency properties is very annoying process.
-
Blend Tip: How to remove gradient stop.
It was a real headache for me to find how to remove gradient stop from the color slider.
-
Silverlight Tip : How to set web page title.
If you have more than one page in your silverlight application it would be great if you will change a web page title when you switch between them.
-
Virtual earth deep zooming.
Recently i wrote an article for SilverlightShow.net, where I've described how you can easily create simple deep zoom application to browse virtual earth maps.
-
ADO.NET Entity framework navigation property trap.
Navigation properties (EntityCollection or EntityReference) of entity object can be automatically loaded without calling their Load method because of they can be already loaded to ObjectStateManager before.
-
Enum in ADO.NET Entity Framework v1
There is no direct support for enum type in ado.net entity framework v1. But it is rather easy to solve this problem.
All u need to do is to create int property with private getter and setter and then add public property to your partial class, which type is enum:
-
Backup and SQL Server diagram opennig problem.
Very often people who works with SQL Server database get the following error when they trying to open database diagrams after restoring database from back up:
Database diagram support objects cannot be installed because this database
does not have a valid owner. To continue, first use the Files page of the
Database Properties dialog box or the ALTER AUTHORIZATION statement to set
the database owner to a valid login, then add the database diagram support
objects.
To fix this problem you should execute this T-SQL script:
EXEC sp_dbcmptlevel 'yourDB', '90';
go
ALTER AUTHORIZATION ON DATABASE::yourDB TO "yourLogin"
go
use [yourDB]
go
EXECUTE AS USER = N'dbo' REVERT
go -
Simple database fixture.
Very often we need to write tests which interact with the database. I found that many people are still doing complex clean up manipulation in tear down method. But in most cases it is useless work. All you need to perform clean up of database after each test is to use TransactionScope. This process is so simple that it is hard to believe that it works. The main idea is to create TransactionScope object in SetUp mehod (Constructor in xUnit) and dispose it in TearDown method (Dispose in xUnit).