Ravendra's Blog

March 20, 2012

Contents within a Broder with DropShadowEffect getts blured (WPF)

Filed under: Uncategorized — Ravendra Mishra @ 11:02 am

I have a user control which mimics behaviour of modal window on WPF application. This user control is wrapped in a border with drop shadow effect. Problem is contents within this user control are not clear, fonts are specially blurred, problem getts worse on resizing etc.


				<Style TargetType="{x:Type UserControl}" x:Key="ctModalWindow">


				<Setter Property="Template">


				<Setter.Value>


				<ControlTemplate TargetType="{x:Type UserControl}">


				<Grid>


				<Border Style="{StaticResource DarkShadowBorderStyle}">


				<Grid>

............

.................

                </grid>


				</Border>


				</Grid>


				</ControlTemplate>


				</Setter.Value>


				</Setter>


				</Style>

 

I found that creating a new border without dropshadow effect and wrapping everything else init solves the problem. While original order is just on top of everything else. It gives same visual appearance and behaviour but solves the problem of blurness. So now template looks like as below


				<Style TargetType="{x:Type UserControl}" x:Key="ctModalWindow">


				<Setter Property="Template">


				<Setter.Value>


				<ControlTemplate TargetType="{x:Type UserControl}">


				<Grid>


				<Border Style="{StaticResource DarkShadowBorderStyle}"/>


				<Border Style="{StaticResource BorderStyle}">


				<Grid>

............

.................

                </grid>


				</Border>


				</Grid>


				</ControlTemplate>


				</Setter.Value>


				</Setter>


				</Style>

 


				<Style TargetType="{x:Type Border}" x:Key="BorderStyle">


				<Setter Property="Background" Value="#FF0090BC"/>


				<Setter Property="BorderBrush" Value="#FF0090BC"/>


				<Setter Property="CornerRadius" Value="5"/>


				<Setter Property="Width" Value="Auto"/>


				<Setter Property="Height" Value="Auto"/>


				</Style>

 


				<Style TargetType="{x:Type Border}" x:Key="DarkShadowBorderStyle" BasedOn="{StaticResource BorderStyle}">


				<Setter Property="Effect">


				<Setter.Value>


				<DropShadowEffect Opacity="0.65" Direction="270" BlurRadius="10"/>


				</Setter.Value>


				</Setter>


				</Style>

Advertisements

June 4, 2010

You have a Beta version of Team Foundation Server installed. The license information cannot be changed.

Filed under: Team foundation server 2010 — Ravendra Mishra @ 2:00 pm

I am using TFS 2010 Beta 2. Today when I click to launch TFS Administrator console I got following dialog box. Not able to do any changes at all.

You have a Beta version of Team Foundation Server installed. The license information cannot be changed.

Is there any way to override this and make some changes. I am aware that TFS 2010 Beta 2 is valid till 30th June 2010, but today its just 4th June.

Solution

Click to cancel button of the dialog box and this will launch TFS Administrator console and enable you to do everything you are supposed to.

TF14098: Access Denied: User [User] needs PendChange permission(s) for $/[Source control folder]

Filed under: Team foundation server 2010 — Ravendra Mishra @ 12:56 pm

I am member of TFS Administrators group, also member of Project Administrator and Contributor for a project. Now I am trying to delete a source control folder from this project and struck by following error.

TF14098: Access Denied: User [User] needs PendChange permission(s) for $/[Source control folder]

Solution

I just checked what are the security permissions for this folder. To do so navigate to the folder location in discussion (in local machine) and use following command

Tf perm

This will basically tell you list of all users/groups with their permission. From this list check if any the group you are the member is denied for PendChange or its directly denied for you. If yes then take the necessary steps to remove that.

Point to note here is Deny always takes precedence. Let’s say you are member of TFS Admin (where all permissions are allowed) and also project reader (where except PendChange is denied) then PendChange of reader will take precedence and you will not be allowed to delete.

June 2, 2010

DataSheet view in sharepoint 2010

Filed under: Sharepoint 2010 — Ravendra Mishra @ 10:25 pm

I am running Sharepoint 2010 on Windows Server 2008 R2 64bit with MS Office 2010 64bit. When I tried to edit list in datasheet view I got following error.

—————————

Message from webpage

—————————

The list cannot be displayed in Datasheet view for one or more of the following reasons:

 

– A datasheet component compatible with Microsoft SharePoint Foundation is not installed.

– Your Web browser does not support ActiveX controls.

– A component is not properly configured for 32-bit or 64-bit support.

—————————

OK

—————————

 

In order to fix this issue I installed the the 2007 Office System Driver: Data Connectivity Components
.
You may directly download it from

http://download.microsoft.com/download/f/d/8/fd8c20d8-e38a-48b6-8691-542403b91da1/AccessDatabaseEngine.exe

Bulk edit TFS Work items

Filed under: Team foundation server 2010 — Ravendra Mishra @ 3:34 pm

TFS power tools command enable to make bulk edit on work items filtered through queries.

Consider a particular scenario when a team member is leaving the project and you want to assign all the stories, bugs etc assigned to him to a new member and also want to provide related comments. Using UI this task may be quite time consuming.

For example: Updating all work items assigned to me to be assigned to Jason (uses Query)

tfpt Query /format:id “project1\Team Queries\My Work Items” | tfpt workitem /update @ /fields:”Assigned To=Jason”

 

All other options of this command are as below:

C:\Program Files\Microsoft Team Foundation Server 2010 Power Tools>tfpt workitem /?

tfpt workitem – Create, update, or view work items

Usage: tfpt workitem [workitemid1 workitemid2 … | @ | @filename]

Usage: tfpt workitem /new type /fields:[field1=value1[;field2=value2;…]|@filename]

Usage: tfpt workitem /update [workitemid1 workitemid2 … | @ | @filename] /fields:[field1=value1[;field2=value2;…]|@filename]

Usage: tfpt workitem /uploadattachment workitemid /recursive /comment:[commenttext|@filename] file1 [file2] [file3 …]

Usage: tfpt workitem /downloadattachment workitemid [filepattern1 …] /path:folder

 

/new Specifies that a new work item of the type entered be created. The number of the new work item is displayed.

type Represents the name of the work item type to create. Use the form <project>\<workItemType>.

/update Specifies that work items should be updated. To read the list of work items from stdin put ‘@’ on the commandline. Use ‘@filename’ to read from a file.

/fields Specifies the fields that are changed and the new values to give to them.

fieldN The name of a field to update.

valueN The value to set on the fieldN.

filename The file that has the field/value pairs to use.

/uploadAttachment Specifies that files should be uploaded and attached to the work item.

/comment Specifies a comment to associate with the attachments.

commenttext The text for the comment.

filename The file that contains the text for the comment.

/recursive Include subdirectories when searching for files.

 

/downloadAttachment Specifies that attachments should be downloaded to the current path.

/path Specifies a path to download the files to

folder The folder to download files to.

 

workitemidN Specifies the id of the work item to retrieve.

fileN Represents the name of a file to upload. File patterns are supported (i.e. *.cs).

fileN Represents the name of a file to upload. File patterns are supported (i.e. *.cs).

filePatternN Represents the name of an attachment to download. File patterns are supported (i.e. *.cs).

 

/server:servername Specifies the URL of the Team Foundation server to connect to.

Example: /server:http://mytfsserver:8080/

Examples:

Creating a new Bug work item with a title of ‘New’ and assigned to Jason

tfpt workitem /new project1\Bug /fields:”Title=New;Assigned To=Jason”

 

Updating work item 123 with field values from a file

tfpt workitem /update 123 /fields:@myFieldValues.txt

 

Updating all work items assigned to me to be assigned to Jason (uses Query)

tfpt Query /format:id “project1\Team Queries\My Work Items” | tfpt workitem /update @ /fields:”Assigned To=Jason”

How To Permanently delete work item: TFS 2010 / 2008

Filed under: Team foundation server 2010 — Ravendra Mishra @ 3:23 pm

In order to delete/ destroy work items or work item types, you’ll need TFS 2008/2010 and you’ll need the respective version of Power Tools.

There are two commands:

DestroyWI: You can use this to destroy one or more work items.

DestroyWITD: You can use this to destroy an entire work item type — this means, you are destroying every work item of that type and the type itself.

Please note: Destroy means that you are permanently removing all trace of this work item/work item type from the operational store.  The work item data will still remain in the reporting warehouse.

In TFS 2008 you need to use TFS power tool commands (i.e. tfpt)

C:\Program Files\Microsoft Team Foundation Server 2008 Power Tools>tfpt destroywi /?

tfpt destroywi – Destroy one or more work items

Destroys a work item or work items. Currently, work items can only be destroyed. Destroying a work item means the work items is physically deleted and cannot be restored. The system does not support logical (and thus recoverable) deletion of work items.

Destroyed work items will remain in the data warehouse.

Usage: tfpt destroywi /server:tfsservername /workitemid:value1[,value2,…] [/noprompt]

/server Required. TFS server.

/workitemid Required. IDs of work items to destroy.

/noprompt If specified, does not ask for confirmation before destroying.

 

While In TFS 2010 you need to use witadmin commands

C:\Program Files\Microsoft Team Foundation Server 2010 Power Tools>witadmin destroywi /?

Work Item Tracking Administration tool. (C) Copyright 2006 Microsoft Corporation. All rights reserved.

Destroys a work item or work items. Currently, work items can only be destroyed. Destroying a work item means the work item is physically deleted and cannot be restored. The system does not support logical (and thus recoverable) deletion of work items.

Usage: witadmin destroywi /collection:collectionurl /id:id [/noprompt]

/collection Specifies the Team Foundation project collection. Use a fully specified URL such as http://servername:8080/tfs/Collection0.

/id Specifies the ID of the work item to destroy. Supports multiple IDs delimited by commas such as 12,15,23 (with no whitespace).

/noprompt Turns off the confirmation message.

How To Permanently Delete TFS Project

Filed under: Team foundation server 2010 — Ravendra Mishra @ 2:39 pm

Team foundation server projects can be permanently deleted. In case you delete the project from team explorer it wont be deleted at all, this wont show to your local team explorer view but it will remain in the database hence visible to other team members.

In case you want to delete it permanently then this can be done in following two ways. (This deletes the whole project; this process is not reversible. Before using these, make sure that all important data has been backed-up appropriately)

  1. Command line
  2. TFS Administrator console

Though data will remain in warehouse database, in case you want to delete entries from warehouse as well then rebuild the warehouse database.

  1. Command line

    TFSDeleteproject [/q] [/force] [/server:servername] team project name

Details at

Customizing existing work item template TFS 2010

Filed under: Team foundation server 2010 — Ravendra Mishra @ 1:51 pm

Individual work item templates of existing process template can be updated and uploaded back to TFS 2010 project collection. If you update complete process template and upload again it won’t take effect on existing projects, however new projects will use updated one.

In order to make changes on existing template individual work item templates need to be modified and uploaded. Steps will be as below

  1. Get latest version of work item template from server. You may use commands or power tools process template editor for this purpose.
  2. Modify downloaded template to make desired changes. You can do this either using any xml editor or TFS power tools process editor.
  3. Upload modified work item template.
  1. Get latest version of work item template from server

You may use commands for this purpose. To export or list work item types, you must be a member of the Readers group or have your View work items in this node permission set to Allow.

witadmin exportwitd /collection:CollectionURL /p:Project /n:TypeName [/f:FileName] [/e:Encoding] [/exportglobalists]

For further details on this refer the link below:

http://msdn.microsoft.com/en-us/library/dd312129.aspx

Or may use TFS power tools GUI installed with VS2010. Download and install TFS Power tools for Visual studio 2010 from http://visualstudiogallery.msdn.microsoft.com/en-us/3e8c9b68-6e39-4577-b9b7-78489b5cb1da

Navigate to export WIT as below

Then select the project and work item type you want to download.

  1. Modify downloaded template

Modify exported .xml file with any xml editor. I normally prefer Visual Studio IDE. Go to the section where you want to make changes.

In case I need to add new fields etc I prefer to use TFS power tools process editor, its much faster to do this task.

While if I have to add new states and transition etc I would prefer xml editor.

You can add new states as you can see in the picture above and transitions as shown in the picture below.

Save the changes, make sure xml file is valid.

  1. Upload modified template

Now final task is to upload modified template to the project where you want these changes to be effective. Again this step can be done either using commands or power tools GUI

witadmin importwitd /collection:CollectionURL [/p:Project] /f:FileName [/e:Encoding] [/v]

or

Speicify the modified file and the project where this modified work item template need to be uploaded.

In case this need to be uploaded on multiple projects then its better to create a batch file using witadmin commands and execute the batch file once.

Dependent work items in TFS 2010 Query result

Filed under: Team foundation server 2010, TFS Query — Ravendra Mishra @ 9:54 am

Dependent work items can be queried in a hierarchal query result view. In order to do so create new query and modify query type from the top drop down list. This will give you further link types to select like Predecessor, successor, child etc.

Column options can be changed to keep it more suited for hierarchal view.

June 1, 2010

Connect to TFS 2010 from Visual Studio 2008

Filed under: Team foundation server 2010 — Ravendra Mishra @ 3:56 pm

You don’t need to upgrade your code from .Net 3.5 to .Net 4.0 (So that you can open it in VS 2010) just because your project is moved to TFS 2010. VS 2008 with SP1 supports connecting TFS 2010. While adding a project from TFS 2010, Team foundation server name should include full path of the project collection.

i.e. http://<Server name>:<port number>/<virtual directory name>/<project collection name>

 

Next Page »

Create a free website or blog at WordPress.com.