.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Screen is hanging when displaying the WPF control...

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :WPF



In my windows form application, I have a WPF control that display a list of warning message. I have defined an animation in order to slide out the panel that include my WPF control as soon as there is a new warning message added to my list.

The problem that our customer reports is that they are receiving a black rectangle when the panel start sliding and the PC is hanging until they kill the process.

I’m not able to reproduce the issue on my PC, but my guess is that it might be something related to the animation that I’m using.

Basically, I’m calling the AnimateWindow method as follow :



View Complete Post

More Related Resource Links

Displaying a System.Drawing.Bitmap in a WPF Image control

How would I convert a System.Drawing.Btimap into a comparable WPF image control so I can display in on my WPF window? Thanks

Displaying XML in label control using xslt formatting

I am using an XML file as a database and I am using a text box and a button to search for a node within the xml file and display that node on a label control using the format required by the xslt file.  I have created an example to use as the real file is rather big. If I add an xml control to the page and set the documentSource and transformSource to my existing files, it will display the node on the page in the correct format.  If I try and pass the query to the label, it only shows the inner text of the XML tags with no spaces and no formatting as specified in the xslt file. Is there a way to pass the query to a label control and render it using the formatting specified in the xslt file?  In all honesty, it doesn't even have to be a label if I can get the query to render as specified in the xslt file in any way shape or form, I would be happy with that.I feel like I am just one statement away from having it complete but for the life of me can't seem to figure out what it is.  Any help is apprecaited.XML File:<?xml version="1.0" encoding="utf-8" ?><?xml-stylesheet type="text/xsl" href="animal.xslt"?><animals>    <animal name="dog">        <color>brown</color>        <hair>lo

Problem displaying Date from Sql table on Calendar Control

Hi, I am displaying Event dates from SQL table on Calendar Control in ASP.NET. Also, I have GridView Control which shows event details when certain date is clicked on calendar control. But I have a problem as not all dates are displaying properly. Strangly enough only dates which have same month and day date are displayed. For example: It shows ok dates such as 08/08/2010, 09/09/2010, 10/10/2010 etc. If I click on the date which in SQL table exists as 11/25/2010 or 12/15/2010 etc (no matching month/day numbers) it shows error message saying: "System.Data.SqlClient.SqlException: Conversion failed when converting date and/or time from character string."  Follwoing is my code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.Sql; using System.Runtime.Remoting.Messaging; using System.Configuration; using System.Data.SqlClient; using System.Data; using System.Drawing; public partial class Test_Calendar : System.Web.UI.Page { SqlConnection mycn; SqlDataAdapter myda; DataSet ds = new DataSet(); DataSet dsSelDate; String strConn; private void Page_Load(object sender, System.EventArgs e) { strConn = "Data Source=mydatasource;Initial Catalog=DBname;Persist Security I

Ajax Control Toolkit - ModalPopup displaying behind Flash

HiI have a flash on my page and I need to popup an ajax window, I use ModalPopupExtender. The problem is that ajax popup window always shows behind the flash in Internet explorer and Google Chrome. In firefox there are no such problem.I tried to set wmode="transparent" but id didn't help.Thanks

Graphs stop displaying in Report Viewer Control after upgrade to SSRS 2008 R2

We are seeing an issue where certain graphs and guages are not being displayed within a report rendered in the report viewer control after we upgraded from SSRS 2008 to SSRS 2008R2.  You can see the graphs and guages render and then disappear from the screen when two other graphs are rendered.  When I export the report to Excel or PDF then all of the graphs and guages are rendered properly. There are a total of 3 graphs and 2 guages on the report - when it completes the rendering process, you can only see two of the graphs displayed in the report viewer control - as I said before, you can see all 3 graphs and 2 guages when exporting to Excel or PDF.  Using Internet Explorer v8.  This problem manifest itself right after the upgrade. Has anyone seen a similar issue? 

Displaying the Rating (Star) Scale Control for a list item.

Is there anyway to display the star rating control? I'm trying to build an application page that displays list items and their associated rating control. I can count the amount of ratings using the SocialRatingManager...?

Calender control. Displaying important dates.

I have a calender control tht you can click on. When you click on a date you see all the events that happens that date. But i want the calender to show what dates have events. I want these dates to have a seperate styling. In the code behind i catch the DayRender event. I have a list will all important dates called "eventDates".   if (eventDates.Contains(e.Day.Date) == true)         {             Calendar1.SelectedDates.Add(e.Day.Date);                       }   if (eventDates.Contains(e.Day.Date) == true)        {            Calendar1.SelectedDates.Add(e.Day.Date);                     }Ive stepped through this method and its triggered once for every day of the month and the dates are addes succesfully. Ive also changed the SelcetedDates property in the mark up, like this: <SelectedDayStyle BackColor="AliceBlue" BorderColor="Red" />But nothing happens. I was hopping that the important dates in the calender would turn into blue background with red borders. I know its sounds horrible but i just wanted to really see if i could make it work. But as i said, nothing ha

Setting .net windows control location based on Screen width

I am developing an windows application in 20 inch moniter. I am positioning the controls in WPF like this

scrollViewer1.Height = Screen.PrimaryScreen.Bounds.Height / 5;

If I run this application in 15 inch monitor whether it will change the position of the control or it will give the look and feel what i expected.

Please clarify?

If it will chnage the positioning,please suggest how to poistion the control to support all screens widths.

DataAnnotation on multiple user controls displaying on wrong control


I have a table that displays a user control on each row. The user controls are strongly typed to a viewmodel which contains DataAnnotation style validation. If one of the rows has invalid data entered (lets say the 3rd row) the data annotation validates display agains the first row/user control.

How do I get the data annotation to show against the relevant user control?

I'd post a pic to show what I mean except it will not display it!.:/

Splash Screen not displaying anymore on startup


I have a PNG file with its Build Action property set to "SplashScreen."  Up until a couple weeks ago it was displaying fine on startup.  At some point (not sure exactly when) it stopped being displayed on start up.  This is a 4.0 WPF app targeting the full framework.  Any ideas why the splash screen won't display anymore?  I have added new image files to the app (both png and jpg) and set their Build Action to splash screen just to test, but it still won't display on startup.


Get Control screen position from a MVVM View Model (not using CodeBehind in the control)


Hi, I am using a MVVM pattern for a WPF UserControl. I need to be able to position a dialog over the top of the control, so I need the top left screen coords for the control.

IF, I was to use code behind, the following seems to do the job..

 private void UserControl_MouseDoubleClick(object sender, MouseButtonEventArgs e)
   Point controlPos = PointToScreen(new Point(0, 0));

The controlPos above seems to give the correct result. However, is there anyway of doing this without having to use any code behind in the actual control (eg have the code purley perhaps in the View model class, of have something in the Controls XAML?

Thanks in advance for any help



Report viewer control is is displaying parameter item 'select a value' even when the default param



I am using SSRS 2008 R2,

I have set the default parameter of dropdown and in the output "select a value" item text is removed ,also in the Report Manager 'select a value' removed .

But when I am displaying the same reports in the ReportViewer control as ReportViewer1.ServerReport  in the the vs 2010 asp.net project the item select a value is reappearing in the output.

Could you please help me remove the default item text 'select a value' from the ReportViewer control aswel.


want to open popup screen on button on user control and and display same user control on pop up


Hi i have page where i am calling user control, on user control i want to give button when i click button same user control should appear on popup screen

but not able to do , here code






void Page_PreRender(object sender, EventArgs e)//some value set as hard coded






string defLayer = "1";//Build the params to be passed to gdd xaml file.







defLayer =


Displaying Role-Specific Markup With the LoginView Control



I want to know how can I display role-specific markup using loginview?

I have these three roles, Admin, Editor, Moderator

Each and every user will belog to only one of the following role groups

1. Admin, Editor,  Moderator (Some user/s will have all these three roles)

2. Admin, Editor   (Some user/s will have all these two roles)

3. Admin, Moderator (Some user/s will have all these two roles)

4. Editor, Moderator (Some user/s will have all these two roles)

5. Admin (Some user/s will have all only this role)

6. Editor (Some user/s will have all only this role)

7. Moderator (Some user/s will have all only this role)

Now I want to display some links that will be specific for each role group to which one or more users will belong. So the links I want to display for these role groups are following

1. Admin, Editor,  Moderator    => Only Links of all the pages of Admin, Editor and Moderator

2. Admin, Editor                       => Only Links of all the pages of Admin and Editor

3. Admin, Moderator                => Only Links of all the pages of Admin and Mode

Error while displaying the sub menu of menu control


Hi all,

I am using asp.net 3.5 menu control and using data from DB to display the Main and sub menu items.It is working fine when i set the current system date to current date (todays date) or any date of current month and the date  greater than the current date.But the problem is when i change the system date to any date less than the current month date, the menu control does not shows me the sub menu items of the menu control.

Please advice.



Mahavir velapure





Displaying SharePoint lists in Web Parts

When you create a built-in or custom list in Microsoft Windows SharePoint Services, Windows SharePoint Services creates a Web Part, a basic building block of a SharePoint site, to display that list. These Web Parts are called List View Web Parts. Windows SharePoint Services stores List View Web Parts in the site collection Web Part gallery. (The site collection Web Part gallery is the most central gallery of Web Parts for a work group. By default, the gallery name is the name of the site, such as "Our Team Site Web Part Gallery." )

Snap It! - How to take screen shot using .Net

We all would have used snap shots (screen shots) to illustrate bugs or behavior or something that others could understand by seeing them. For taking snap shots we just hit the "Print Screen" key and copy it to Ms Paint and save it. Ever wondered how to programmatically take a snap shot? Then this article is for you.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend