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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

Measure question - my desired size changes but parent controls don't catch an ondesired size change

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

I have an items presenter that contains expanders.  (In order to debug the events, I have a custom items presenter class with an OnChildDesiredSizeChanged event that does nothing more than base.OnChildDesiredEvent.  That way I can debug what I am really working on.

I have a custom expander class that I want to have change its desired size when it is collapsed.  The frustrating thing about expander is that they will update a desired size when you expand, but not when you collapse it.  So I have a custom expander class with my own on collapse event.  The idea is to remeasure the expander.  I had thought that doing so would cause it to notify parents that its desired size changed like what already happens when we expand.

So here is the collapse handler in my custom expander.

protected override void OnCollapsed()
		{
			UIElement hdr = Header as UIElement;
			if (hdr != null)
			{
				InvalidateMeasure();
				Measure(hdr.RenderSize);
				
			}
		}

Debugging I can see the desired size get smaller before and after I call measure.  So my desired size propert


View Complete Post


More Related Resource Links

Change the default size of http binding - question about

  

I change the http binding buffer size to be maximum possible.

 

<binding name="LargeData_basicHttpBinding" maxBufferSize="2147483647" 
             
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"> 
             
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" 
  &n

Log file size question

  
I recently setup transaction log backups after we had a log file get near its capacity. I noticed after log files are truncated, they still use up the same amount of disk space. Is it safe to shrink a log file?  If so how do you determine what is an appropriate size to shrink it to? I ask this because some databases, like a sharepoint content database, have log files that are 130 GB in size when their data files are only 5 GB.  I assume that now that I am running hourly log backups they dont need logg files that huge. -Edit - Also most of the logg files are setup with the default settings

SmallSearchInputBox inputbox size change

  
Good Morning I am attempting to do, what I thought, an easy task. All I want to do is increase the size of the input box in SmallSearchInputBox. I played with every class under the universe and finially noticed that in the rendered html there is an inline stype setting the width to 170px. How can I change this? thanks Jake

How to change the size (width) of scorecard columns in Dashboard Designer?

  
Is there any way to change the size (width) of scorecard columns in Dashboard Designer?

How can I change the WPF window title bar size through Interop services

  
Hi all,      I want to use my custom title bar in my custom window. In that need a title bar with more height than default widow title bar height. How can I achieve this through window Interop services???? Thanks in Advance.. Suresh.

"max-template-document-size" change not working as expected

  
Hi There I have a 2 node MOSS 2007 deployment hosting 5 webapps. The one web app I am having a problem with is a customised solution from a 3rd party. The product users need to save sites as templates, to which they get an error saying that the template is too large. I have run the max-template-document-size stsadm command and increased the value from 5mb to 50mb but it seems the change is not taking effect. The error page says the limit is still 5mb. When I use stsadm getproperty it shows that the value has in fact increased. I have made sure that I am doing this on the correct webapp. The save as template operation works if I do not select the "save content" option. The sites have no content so the cannot be greater than 50mb. Am I missing something extremely obvious?

Sharepoint Database size question

  
We have just installed Sharepoint 2010 in our network.  We currently have 2 users who are accessing the system, since we are in alpha stage.  What I have noticed is that  User Profile Service Application_SyncDB database size is at 800mb.  is this normal? In addtion, WSS_Logging database size is at 140mb. 

Windows.Forms.Label size change issue

  

Issue:

In a Windows Forms application developed with VB2008 Express, Label controls change size the first time the .Text property is updated.

Details:

On a Windows XP Pro SP3 system where the app was developed the labels retain the size set at design time.  On other systems, one also Windows XP, one Windows 7, labels shrink (all to the same size independent of content) the first time their .Text property is updated.  Labels that do not have their .Text property updated retain their design size.

Additional information:

The labels all occur within a FixedPanel of a SplitContainer.
Salient properties for the Label controls:
Anchor: Top, Left
AutoSize: False
BorderStyle: FixedSingle
Dock: None
Enabled: True
FlatStyle: Standard
Image: None
Locked: False
Margin: 0,0,0,0
MaximumSize:

Here is my new control code i couldnt make it so if i change the control size on form1 designer so i

  

I have two major problems.

1. After dragged the control to form1 designer when im on form1 designer i dont see anything in the control only when i run my program. I thought ill some kind of preview or what i painted in the control ill see it on the form1 designer before i run my application.

2. On form1 when i manualy stretch the size of the new control on form1 designer to be bigger or smaller the things i painted dosent fit i thought the way i created the code in the control code it will keep its size arroding to the size changed ill do in form1 designer but it dosent.

 

So here is the code of the control and form1 can someone help me with this two problems show me the correct code?

 

First the control code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DannyGeneral;

namespace My_Diet_Control
{
   
    public partial class My_Diet_Graph_Control : UserControl
    {
      
        int x_axis_lenght;
        int y_axis_lenght;
   &

Here is my new control code i couldnt make it so if i change the control size on form1 designer so i

  

I have two major problems.

1. After dragged the control to form1 designer when im on form1 designer i dont see anything in the control only when i run my program. I thought ill some kind of preview or what i painted in the control ill see it on the form1 designer before i run my application.

2. On form1 when i manualy stretch the size of the new control on form1 designer to be bigger or smaller the things i painted dosent fit i thought the way i created the code in the control code it will keep its size arroding to the size changed ill do in form1 designer but it dosent.

 

So here is the code of the control and form1 can someone help me with this two problems show me the correct code?

 

First the control code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;<


danieli

Tabcontrol size change

  

I have a TabControl inside a panel with a number of tab items.Now I want the selected tab item to fill all the available space in the panel when it resizes.But what happens is, different tab items take different sizes when I switch between the tabs.I want the size to stay same when selecting different tab pages(May be the size of the largest one).

Any suggestions would be greatly appreciated.Thanks in advance.

 


Change canvas size along with Zoom Out !?

  

Hello everyone,

 

I am working on something where I use mouse wheel to zoom in and out of the canvas.

I do;

this.canvas.RenderTransform = new ScaleTransform(currentMattrix.M11 + 0.1, currentMattrix.M22 + 0.1, e.GetPosition(this.canvasPanel).X, e.GetPosition(this.canvas).Y);

this.canvas.RenderTransform = new ScaleTransform(currentMattrix.M11 - 0.1, currentMattrix.M22 - 0.1, e.GetPosition(this.canvasPanel).X, e.GetPosition(this.canvas).Y);

 

My problem is, when I zoom out beyond currentMattrix.M11 < 1, I see the canvas shrink and the form around the canvas is visible.

How can I prevent this? Can I increase the Canvas size along with zoom out in the same proportion as of zoom or is there any other way?

 

P.S. I don't have a XAML file so doing everything through code and my canvas in inside a dock panel.

 

 


--- How to change SEARCH BOX size on a master page?-----

  

Hi everybody,

Can you please help me: where can I find a file which is responsible for the size of the Search Box on a V4.master? (I am using the Custom.master which I made out of V4.master).

I've tried to look in Search.css, coreV4.css and also I did search for SmallSearchInputBox in all files in hive 14. Couldn't find anything.

Thank you in advance!


DetailsView - Change field size for easier editing

  

Hi All

Very new to VS2010

I've got data in a DetailsView control which shows the data and expands the rows to suit the content.

However, when I click to edit the information, the editing area changes to just a few characters wide.

How do I change the size of the editing area to match the view data state?

Thanks for helping!

 

 


How do I determine the size of a dynamically created set of controls?

  

Hello,

How do I determine the size of a dynamically created set of controls?

For example, suppose I have a method that creates a form made up of many TextBlocks, TextBoxes, etc., all contained within a grid and that grid is returned by the method.  I need to determine the size of that grid without adding it to any other controls.

    Grid myForm = myMethodThatReturnsAGrid();

    // Here is where I want to find out the size (height and width) of the grid myForm.

The reason I need the size, mainly the height is to determine if it will fit in what is left of the page of a FixedDocument for a report, and if not, to move it to the next page.

Regards,

Robert

 


Regards, Robert -- Note: I work on various aspects of one or more programs, working on what is most important at the time. Some questions I ask are on aspects of the program that are not important right now or I'm using a workaround for now. Eventually they'll be high priority again and I'll get back to those answers received and respond accordingly. Those that are high priority get responses very soon. Thanks for your input, it is appreciated.

Unable to apply custom font-size for pager controls using pagerstyle of SPGridview

  

Hi,

  I am using an SPGridView to view my data.

  I turned on pagination for this Gridview.

  For the pager controls I am trying to change the font size and font-style to match with the other text on the page.

 I am trying to set these by applying values for PagerStyle property of SPGridView.

grid1.PagerSettings.Mode =

PagerButtons.NumericFirstLast;

 

true;

But the changes are not being reflected during run-time.

Can somebody tell me why and how can I bring these changes at run-time.

 

Thank you


pal

grid1.PagerStyle.Font.Size = 2;

grid1.PagerStyle.Font.Bold =


Reduce ASP.NET Page size and complexity using JQuery

  
This is my first post on asp.net blog. ASP.NET Ajax and JQuery are two different ajax framework. In this post I will show, how we can enhance gridview using ASP.NET Ajax and JQuery. I also compare the implementation of these frameworks. In next posts i will explain more about JQuery and ASP.NET Ajax and also tell you "How to combine the power of both framework". My Future post will related to ASP.NET and related frameworks.
Categories: 
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