Click here to Skip to main content
15,566,623 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: wpf 3d transparency Pin
Pete O'Hanlon25-Nov-09 2:47
mvaPete O'Hanlon25-Nov-09 2:47 
QuestionGetting Started - WPF/ WCF/ WWF Pin
Anoop Brijmohun24-Nov-09 23:43
Anoop Brijmohun24-Nov-09 23:43 
AnswerRe: Getting Started - WPF/ WCF/ WWF Pin
Mark Salsbery25-Nov-09 16:55
Mark Salsbery25-Nov-09 16:55 
AnswerRe: Getting Started - WPF/ WCF/ WWF Pin
sisvis26-Nov-09 3:56
sisvis26-Nov-09 3:56 
QuestionWPF Table control Pin
Nekkantidivya24-Nov-09 2:07
Nekkantidivya24-Nov-09 2:07 
AnswerRe: WPF Table control Pin
Mark Salsbery24-Nov-09 7:57
Mark Salsbery24-Nov-09 7:57 
GeneralRe: WPF Table control Pin
Nekkantidivya24-Nov-09 18:00
Nekkantidivya24-Nov-09 18:00 
GeneralRe: WPF Table control Pin
Mark Salsbery24-Nov-09 18:48
Mark Salsbery24-Nov-09 18:48 
Nekkantidivya wrote:
now the width of the table is fixed and I am unable to increase the width of the tableto the width of the form.


Wrap the FlowDocumentScrollViewer in an element that resizes its children,
like a Grid or a Window.

For example (borrowing the flowdocument from the documentation), note how resizing this window resizes the table to fit:
<Window x:Class="WPFTester.Window4"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:wpftk="http://schemas.microsoft.com/wpf/2008/toolkit"
    xmlns:local="clr-namespace:WPFTester"
    Title="Window4" Height="500" Width="500">
    <Grid >

        <FlowDocumentScrollViewer IsToolBarVisible="False" ><!--<FlowDocumentReader >-->

            <FlowDocument>

                <Table CellSpacing="5">

                    <Table.Columns>
                        <TableColumn/>
                        <TableColumn/>
                        <TableColumn/>
                        <TableColumn/>
                    </Table.Columns>

                    <TableRowGroup>

                        <!-- Title row for the table. -->
                        <TableRow Background="SkyBlue">
                            <TableCell ColumnSpan="4" TextAlignment="Center">
                                <Paragraph FontSize="24pt" FontWeight="Bold">Planetary Information</Paragraph>
                            </TableCell>
                        </TableRow>

                        <!-- Header row for the table. -->
                        <TableRow Background="LightGoldenrodYellow">
                            <TableCell>
                                <Paragraph FontSize="14pt" FontWeight="Bold">Planet</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph FontSize="14pt" FontWeight="Bold">Mean Distance from Sun</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph FontSize="14pt" FontWeight="Bold">Mean Diameter</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph FontSize="14pt" FontWeight="Bold">Approximate Mass</Paragraph>
                            </TableCell>
                        </TableRow>

                        <!-- Sub-title row for the inner planets. -->
                        <TableRow>
                            <TableCell ColumnSpan="4">
                                <Paragraph FontSize="14pt" FontWeight="Bold">The Inner Planets</Paragraph>
                            </TableCell>
                        </TableRow>

                        <!-- Four data rows for the inner planets. -->
                        <TableRow>
                            <TableCell>
                                <Paragraph>Mercury</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>57,910,000 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>4,880 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>3.30e23 kg</Paragraph>
                            </TableCell>
                        </TableRow>
                        <TableRow Background="lightgray">
                            <TableCell>
                                <Paragraph>Venus</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>108,200,000 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>12,103.6 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>4.869e24 kg</Paragraph>
                            </TableCell>
                        </TableRow>
                        <TableRow>
                            <TableCell>
                                <Paragraph>Earth</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>149,600,000 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>12,756.3 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>5.972e24 kg</Paragraph>
                            </TableCell>
                        </TableRow>
                        <TableRow Background="lightgray">
                            <TableCell>
                                <Paragraph>Mars</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>227,940,000 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>6,794 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>6.4219e23 kg</Paragraph>
                            </TableCell>
                        </TableRow>

                        <!-- Sub-title row for the outter planets. -->
                        <TableRow>
                            <TableCell ColumnSpan="4">
                                <Paragraph FontSize="14pt" FontWeight="Bold">The Major Outer Planets</Paragraph>
                            </TableCell>
                        </TableRow>

                        <!-- Four data rows for the major outter planets. -->
                        <TableRow>
                            <TableCell>
                                <Paragraph>Jupiter</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>778,330,000 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>142,984 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>1.900e27 kg</Paragraph>
                            </TableCell>
                        </TableRow>
                        <TableRow Background="lightgray">
                            <TableCell>
                                <Paragraph>Saturn</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>1,429,400,000 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>120,536 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>5.68e26 kg</Paragraph>
                            </TableCell>
                        </TableRow>
                        <TableRow>
                            <TableCell>
                                <Paragraph>Uranus</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>2,870,990,000 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>51,118 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>8.683e25 kg</Paragraph>
                            </TableCell>
                        </TableRow>
                        <TableRow Background="lightgray">
                            <TableCell>
                                <Paragraph>Neptune</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>4,504,000,000 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>49,532 km</Paragraph>
                            </TableCell>
                            <TableCell>
                                <Paragraph>1.0247e26 kg</Paragraph>
                            </TableCell>
                        </TableRow>

                        <!-- Footer row for the table. -->
                        <TableRow>
                            <TableCell ColumnSpan="4">
                                <Paragraph FontSize="10pt" FontStyle="Italic">
                                    Information from the
                                    <Hyperlink NavigateUri="http://encarta.msn.com/encnet/refpages/artcenter.aspx">Encarta</Hyperlink>
                                    web site.
                                </Paragraph>
                            </TableCell>
                        </TableRow>

                    </TableRowGroup>
                </Table>
            </FlowDocument>

        </FlowDocumentScrollViewer>

    </Grid>

</Window>


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

QuestionReceiving Messages/Notifications in Silverlight from Stand Alone WF Duplex Service Pin
Topher Clay23-Nov-09 5:56
Topher Clay23-Nov-09 5:56 
QuestionSilverlight Business Application VS Web Application Pin
hussain.attiya22-Nov-09 20:51
hussain.attiya22-Nov-09 20:51 
AnswerRe: Silverlight Business Application VS Web Application Pin
Mark Salsbery23-Nov-09 8:00
Mark Salsbery23-Nov-09 8:00 
GeneralRe: Silverlight Business Application VS Web Application Pin
hussain.attiya23-Nov-09 20:22
hussain.attiya23-Nov-09 20:22 
GeneralRe: Silverlight Business Application VS Web Application Pin
Mark Salsbery24-Nov-09 7:28
Mark Salsbery24-Nov-09 7:28 
QuestionHow to change WPF table width and height Pin
Nekkantidivya22-Nov-09 18:04
Nekkantidivya22-Nov-09 18:04 
GeneralRe: How to change WPF table width and height Pin
AspDotNetDev22-Nov-09 19:30
protectorAspDotNetDev22-Nov-09 19:30 
GeneralRe: How to change WPF table width and height Pin
Richard MacCutchan22-Nov-09 22:46
mveRichard MacCutchan22-Nov-09 22:46 
GeneralRe: How to change WPF table width and height Pin
AspDotNetDev22-Nov-09 22:50
protectorAspDotNetDev22-Nov-09 22:50 
GeneralRe: How to change WPF table width and height Pin
Richard MacCutchan22-Nov-09 23:32
mveRichard MacCutchan22-Nov-09 23:32 
QuestionNew WPF App - DMon [modified] Pin
Jammer22-Nov-09 11:28
Jammer22-Nov-09 11:28 
AnswerRe: New WPF App - DMon Pin
Richard MacCutchan22-Nov-09 12:05
mveRichard MacCutchan22-Nov-09 12:05 
GeneralRe: New WPF App - DMon Pin
Jammer22-Nov-09 12:08
Jammer22-Nov-09 12:08 
GeneralRe: New WPF App - DMon Pin
Richard MacCutchan22-Nov-09 12:33
mveRichard MacCutchan22-Nov-09 12:33 
QuestionAutosuggest textbox in WPF application Pin
Nekkantidivya20-Nov-09 21:07
Nekkantidivya20-Nov-09 21:07 
AnswerRe: Autosuggest textbox in WPF application Pin
AspDotNetDev23-Nov-09 21:40
protectorAspDotNetDev23-Nov-09 21:40 
QuestionGeneric.xaml location Pin
Mikey_H20-Nov-09 20:04
Mikey_H20-Nov-09 20:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.