Re: Property Window and 3rd party webcontrols

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



The Font class has the Editor attribute defined with a UITypeEditor as the parameter which allows it to be edited differently in a PropertyGrid. Editing values in the PropertyGrid is not related to the XML generated because the PropertyGrid modifies a design-time version of your control and when you change a control's property, the HostDesigner for the Page class serializes your property modifications to the XML that you see. The same occurs with WindowsForms controls except that the properties are persisted using CodeDom instead of XML.

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com



"Mutley" <John.Nugent@xxxxxxxxxxxxxxxxx> wrote in message news:1173891249.188599.33480@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

Hi,
I am adding custom controls to Visual studio which can then be
dragged onto a page and the controls properties appear in the property
grid window. The Font property of one of my controls appears in the
property window with a + sign beside Font which can then be expanded
to show the various sub-properties of Font. When the form is saved the
html for the page shows the following <asp:textbox id =... Font-
Bold="True" Font-Italic="True">.
I have a 3rd party control (a charting tool) that when dropped into a
page has a property called Chart that contains multiple properties for
the chart. When I look at the saved html I see the following

<cc1:GSNetWebChart ... runat="server">
<Chart ChartType="Line2D" Size="600, 400">
<ChartTitle IsVisible="True" Text="Chart Title" >
<Border FadedEdgeColor="White"
RaisedLoweredColor="Gray"></Border>
<Background GradientEndColor="MediumBlue" Color="White"></Background>

My question is what setting\attribute relating to a property causes
the Font properties to be saved as name-value pairs in the textbox
tag
whereas the chart property has its own tags in the html (I did notice
that the chart property value is a large piece of XML whereas the Font
property value was a Font object) .

Thanks in advance for any help
John

.



Relevant Pages

  • Property Window and 3rd party webcontrols
    ... I am adding custom controls to Visual studio which can then be ... grid window. ... The Font property of one of my controls appears in the ... that the chart property value is a large piece of XML whereas the Font ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Property Window and 3rd party webcontrols
    ... I am adding custom controls to Visual studio which can then be ... grid window. ... The Font property of one of my controls appears in the ... that the chart property value is a large piece of XML whereas the Font ...
    (microsoft.public.dotnet.framework.windowsforms.designtime)
  • Dialog units vs Bitmap dependence
    ... If you create a dialog and controls from a resource script, ... The existence of dialog-units has ... Pick a font and font-size with a nice pixel to dialog-unit ratio ...
    (microsoft.public.win32.programmer.ui)
  • Re: Creating dialog controls at run-time
    ... If you don't like the font, ... Choose some range for controls like 10,000 to 11,000. ... If you are creating buttons dynamically, you cannot use hardwired integer values. ... incorrectly--then you would not have had the memory leak. ...
    (microsoft.public.vc.mfc)
  • Re: adjusting fonts to computers dpi settings
    ... font size to 6 it will correct all wrong places. ... Yes, it is possible to run through the Controls changing font sizes in that manner, but personally I would not advise doing so, at least until you have looked into this problem a little further. ... Then at run time it converts those twip values into pixels using the twips per pixel setting of the machine on which the code is currently running (15 twips per pixel on a 96 dpi machine, 12 twips per pixel on a 120 dpi machine, etc, etc) and it sets both their size and position in accordance with the returned values. ...
    (microsoft.public.vb.general.discussion)