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

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

Adjusting for larger fonts etc.

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

I have been working on an application in WPF which contains quite a few different categories of input. For this I have set up Grids that contain textboxes for input and display of values and textblocks for describing the categories and the textboxes. I spent quite a bit of time and worked out sizes so that the application looks really nice, considering it's something that I have made at least. In recent days it has come to my attention that some users that run XP have set their font to be larger, which means that some of the text gets cutoff. both length and heightwise. There are also some small differences, I'm assuming because of different default fonts, when running on 7, Vista and XP which does not make as big of a difference but still not optimal as far as design. I searched the forums and found some help and this is what I did.

Everything is nicely set up in grids, so I ended up changing the height and with in row and column-definitions to auto instead. I had to adjust some margins to make it look nice and also set a minwidth on textbox columns as it could look rather silly with such small boxes when they all contained just a 0. Anyway, I have tried in on XP, 7 and Vista with different settings now and the text fits, so it appears to be doing what I am telling it to do, but it doesn't look as nice as before, in my opinion. The categories that I have

View Complete Post

More Related Resource Links

{ End Bracket }: It's Not Just Fonts


Creating a typeface that's truly readable on a screen is much more complex than people realize. The average core font in Windows®, for instance, has about 25,000 lines of executable code as well as the outline and other data.

Bill Hill

MSDN Magazine June 2005

.BAK file is considerably larger than the MDF

Hi   I have recently performed a back-up of my database and found that the .BAK file is much larger than the MDF. The MDF is 400mb yet the .BAK is a massive 20gig!   I have research all the usual problems such as using INIT to replace the original file and I am not using any replication processes.   The problem is only happening on one of my databases on the server, the other 7 seem to work fine and back-up with acceptable sizes   Any suggestions   Chris

Cannot Upload Files Larger Than 30mb

We've followed the steps outlined in the MS KB Article here: http://support.microsoft.com/?id=925083 however we continue to be unable to upload files larger than 30mb to document libraries in our production MOSS farm.Web App set to allow 250mb uploadsUsing 10mb a file called "test20.mp3" - No issues, upload works fineUsing a 31mb file called "test31.mp3" ...When we attempt to upload into a document library using upload.aspx, we get a 404 page with the following URL (domain removed):http://WWW.THEDOMAINNAME.EDU/about/_layouts/Upload.aspx?List=%7b4945146E-FB11-4E80-8D2F-954996EB47F4%7d&RootFolder=%2fabout%2fDocuments&Source=http%3a%2f%WWW.THEDOMAINNAME.EDU%2fabout%2fDocuments%2fForms%2fAllItems.aspx  When we attempt to upload using the Explorer view of that same document library (all other document libraries tested exibit the same behavior), we get an error pop up box: "An error occurred copying some or all the selected files."  (NOTE: we appear to be using FPRPC in the Explorer view, not sure if that is relevant or not)We've tested this behavior on two other test farms we have running.  On both farms, (one WSS, one MOSS) uploading the same 31mb test file works fine with all the default settings in place.MOSS Environment2 Node Windows NLB FEsSQL2000 BEWindows 2003 Standard SP2Any input would be greatly appreciated.

Indexing files larger than 16 MB in SharePoint 2010

Tonight, I came across an interesting blog post by Fellow MVP, Todd Klidnt in which he explains how to work around the 16 MB limitation for file indexing in SharePoint 2010 using PowerShell. "As with previous versions of SharePoint, SharePoint 2010 will not index the contents of files larger than 16 MB. There are a couple of reasons for this such as network usage pulling large files across and the time it takes to break them apart". Click here to continue to the post.

WPF control size is larger than explicitly set width and height values.

I created a Canvas with fixed Width and Height (256x256). Next to it I put an Image control displaying a 256x256 texture without stretching. How is it possible that actual sizes of both controls on the screen differ so much? Here - is the screenshot illustrating size mismatch. And here - the TestLines256.png in case someone liked to check it (and maybe point out that I'm stupid and this texture is 180x180 and not 256x256 as I claimed). XAML with creation of the controls:   <Window x:Class="OversizedQuad.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" SizeToContent="WidthAndHeight"> <StackPanel Orientation="Horizontal"> <Canvas Width="256" Height="256" Background="Red" /> <Image Stretch="None" Source="TestLines256.png" /> </StackPanel>

Images in WPF are larger then what they should be?

Hi, I have the following wpf xaml:   <Window x:Class="WpfApplication1.MainWindow"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         Title="MainWindow" HorizontalAlignment="Left" VerticalAlignment="Top">         <Image Stretch="None" Source="..." HorizontalAlignment="Left" VerticalAlignment="Top" /> </Window> The source image can be anything really. From some reason, all images displayed larger than they truly are... Is there something I missing? I tried to define a width and height for the image, but I just crop it to it's real size Thanks in advance for any help

SSIS - Adjusting command timeout (good or bad practice)

Hi,   I'm building a bank reconciliation process where I'm leveraging SSIS to import, transform and insert data into a database.  I had a command timeout error at the transformation segment (Derived Column methods). At first was it difficult to determine (Ambigious SSIS errors), but in the end was easy to resolve.  I simply increased the timeout duration. Being a developer, I find this to be bad practice as the application should be optimized as much as possible prior to making a timeout adjustment.  An ideal method would have been to cache more data prior to calling the database command, so the data is available for processing and not keeping the command open unnecessarily. I'm relatively new to SSIS, but have been unable to determine a method to remove the transformation bottleneck. I could do it easily enough with customized .NET code, but I'd prefer not to do that.  My question - There must be a method in SSIS that buffers the data originating from the transformation prior to calling my INSERT to database method?   Thank you,   Russ

Button height doesn't increase with larger font size

Hi, I've got a couple buttons in a StackPanel that aren't increasing when I increase the font size. I think it has to do with the VerticalAlignment but I'm not catching what's going on. Here is the xaml: <StackPanel Grid.Row="3" Grid.RowSpan="1" Height="Auto" HorizontalAlignment="Stretch" Name="stackPanel1" VerticalAlignment="Stretch" Width="Auto" Orientation="Horizontal"> <Button Background="#FF7F3F96" BorderBrush="{x:Null}" Content="exit" FontFamily="Myriad Pro" FontSize="12" Foreground="White" Width="Auto" MinWidth="74" Margin="23,8,11,9" /> <Button BorderBrush="{x:Null}" Content="new" FontFamily="Myriad Pro" FontSize="12" Foreground="White" RenderTransformOrigin="-0.243,0.516" Width="Auto" MinWidth="74" Margin="11,8,11,9"> <Button.Background> <SolidColorBrush Color="{DynamicResource Green}" /> </Button.Background> </Button> </StackPanel>

Error occuring while exporting larger reports to Excel from SharePoint



I have SSRS configured in SharePoint integration mode. I have reports deployed. if a user wants to export the report to an excel file works fine for smaller reports. But, in the case of larger reports it is throwing me an error while doing export to Excel. I am getting message like

An unexpected error has occured.

Example: Monthly reports are exporting to excel file fine. Where as, Yearly report has more data than the monthly reports. If I try to export these reports, I am getting above error. I must sure, this is something to do with the IIS time out or application time out(setting in web.config file of web application). Please some one guide me where is best place to do this.

Viewing works fine for both the reports.

I appreciate your help.



Moving a larger Sharepoint 2007 site collection over to a new server



We have a Sharepoint 2007 site collection roughly 36 GB in size and have been having problems moving the site to a new server farm (Also 2007). We are trying the Sharepoint backup and restore method, but I understand that this method is not recommended for sites over 5GB. Has anyone moved a site of this size and how did you do it?

Thanks  Ron


Can you modify fonts on sparkline tooltips?


I would like to change the color and fonts on tooltips for the sparklines on an SSRS report.  I'd also like to be able to change the color of the border around the tooltip box.  I've searched for solutions to this and have come up empty so far.  Any ideas on how this might be accomplished?



Query acting weird.. larger date range works in 1min 26sec and a smaller range say 1 month - 3 month


I have no clue why my query is acting weird

If i try to run it for 1/1/2010 9/30/2010 the query takes around 1min 26 sec and  return around a million rows

and If i run for 8/1/2010 to 8/31/2010 it takes forever to it...

basically i am getting data from 5 tables and putting it in a temp table and then updating that temp table 2-3 times with some information and then displaying it.

I am stumped as to why it works fast for a longer date range and runs the  snail for a small period of time..

I am in the verge of pulling my hair and going crazy..

any help will be appreciated.




Not able to upload file larger than 28 MB



We have WSS 3.0 on Win 2008 and IIS 7. I am not able to upload large files. I am getting HTTP 404 error while uploading single file and when I try multiple upload, it seems to upload a file and then page refreshes but the file is nowhere to be found. I am searching from last 3 days and applied all possible steps out on web.

I have applied steps on http://support.microsoft.com/kb/925083 and http://support.microsoft.com/kb/944981

I have also increased the chunk size in SQL and increased the time-out setting in IIS.

Any help is highly appreciated.



Dynamically adjusting Gridview Column Width



I populate a gridview dynamically which has differen column numbers depend on requirements. My goal is to adjust column width dynamically. I have tried several methods and events, then RowCreated event of GridView looks best one to do. My code is as below. When i check result at the ViewSource on the browser, i can see that width of <td> successfully adjusted. BUT nothing changes on the browser, column width always as wide as text? Can you please advise what to do?

My Code

    Protected Sub GridViewAgeing_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridViewAgeing.RowCreated
        If e.Row.RowType = DataControlRowType.Header Then
            Dim td As TableCell
            For Each td In e.Row.Cells
                td.Width = Unit.Pixel(500)
                td.Text = td.Text.Replace("_", " ")
        End If

        If e.Row.RowType = DataControlRowType.DataRow Then
            Dim td2 As TableCell
            For Each td2 In e.Row.Cells
                td2.Width = Unit.Pixel(500)
        End If
    End Sub



	<table cellspacing="0" rules="all" border="

EF codefirst, is it safe to play this card on a larger scale project?


Hi this two last days I been learning EF4 using POCO classes. Now it would be sweet to just be able to use classes with no .admx file at all. My question is what's the pros and cons about it and is it safe to use it on a larger scale project?

thanks in advance

Is embedding of fonts in wpf application will save from corrupted font cache?



Recently I had corrupted font cache. I fixed it by removal of cache file and restarting of Wpf font cache service. Also I updated my outdated driver.

However there're lot's of users on customer side without administrative rights and there're no way to upgrade their pretty old drivers of videocards.


Could you say me what if i embed all fonts application use in application resources - will it help those guys to not relay on Font Cache ?

How to make the Recent Projects pane of the Start Page larger

Is there a way to expand the size of the Recent Projects pane in Visual Studio? I'm a BI developer and it's impossible to see enough of the SSIS solution names in the Recent Projects list to choose the correct one.
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