|
Nekkantidivya wrote: Here I am getting some extra features for zooming, scrollbar etc, but I want just a table.
Maybe you can use a simpler flow document reader like a
FlowDocumentScrollViewer:
<!--<FlowDocumentReader Margin="131,133.738,184,217.262" ScrollViewer.HorizontalScrollBarVisibility="Hidden" >-->
<FlowDocumentScrollViewer IsToolBarVisible="False" Margin="131,133.738,184,217.262" HorizontalScrollBarVisibility="Hidden" >
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark Salsbery,
Thanks for your reply. It helped me and now I am getting table without unnecessary features.
But now the width of the table is fixed and I am unable to increase the width of the tableto the width of the form.
Please reply me if you have any idea to solve this
Thanks in advance.
|
|
|
|
|
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++
|
|
|
|
|
Ok, I have a Silverlight application and I am trying to receive message events from a stand alone Windows Workflow (state machine). Now I am pretry sure that this can be done using a duplex service. However, the issue is not with the service that will live on the WF side, but with our service that is going to live in Silverlight app. We are trying to develop a service that will complete a "handshake" with the workflow in order to tell the flow what activity messages we want and then have our silverlight app listen for those specific messages and then receive those messages. If anyone can help that would be great. Also I do understand that Silverlight does not support Windows Workflow. These two applications will run independently of eachother. This will be a Live message update scenario.
Thanks, I hope someone can help!!
Aspiring Code Monkeys
I can also be reached at my personal email at c.topher.clay@gmail.com
|
|
|
|
|
Hi all,
I used to use .Net application for all our web application. I did not really interested to do silverlight buiness application dispite it is very cool and the UI is nice.
i had an argument with one of my collegue. he is saying that we can use silverlight Biz. application instead of our web application for our development. but what i am saying that silverlight is not much sopheticated to be able to develop huge application. it is designed for small and basic applications only.
this was our agrument. i tried to find out comparision between silverlight Business Application and Web Application. i could not find.
thats why i am posting my question here which is:
Can we use SilverLight Business Application to do all our web applications
Hussain Mohammed Saleh Attiya
ISP Technical Manager
Atyaf Telcom - Bahrain
|
|
|
|
|
hussain.attiya wrote: i tried to find out comparision between silverlight Business Application and Web Application.
Maybe an understanding of what Silverlight is would help
to start with...
What is Silverlight?[^]
What do you mean by "web application"?
What is "SilverLight Business Application"? Do you mean the
project template that comes with the Silverlight 3.0 development
tools?
Silverlight is implemented as a browser plugin (like Flash) so Silverlight
applications run on the client side. Silverlight can be hosted on any web page
including web pages from ASP.NET web applications.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hi,
i know what is silverlight and i know it is a browser client application in web page. but in silver light also you can create business application that can be communicated with the database through domainDataSource class and you have alot of controls like DataGrid FormView etc.
what i am asking is that; is it posible to develope a complete business application like what we do in .net web application.
i think the best thing for me is to take an existing web application and try to re-develop it using silverlight business application.
Hussain Mohammed Saleh Attiya
ISP Technical Manager
Atyaf Telcom - Bahrain
|
|
|
|
|
hussain.attiya wrote: is it posible to develope a complete business application like what we do in .net web application
Is it possible? Yes. I'm doing it. But your definition of a
"complete business application" may be different.
Again, the big difference is, Silverlight runs .NET on the client,
where any other .NET web application runs on the server. You can take
advantage of code running on the client to provide a richer UI.
I prefer to use Silverlight as part of a .NET web application, so I can
leverage >NET code on both the client and the server.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I am using WPF table in my application to display my data.But the table was fixed to particular width. I am not able to change this. I want this table's width as my WPF form width. I tried in <FlowDocument.Resources>, Style tag. But not able to change the width and height. Below is my code.
<FlowDocumentReader Margin="67,150,51,267" >
<FlowDocument>
<FlowDocument.Resources>
<Style TargetType="{x:Type Paragraph}">
<!--<Setter Property="" Value="100%"/>-->
<Setter Property="FontSize" Value="12px"/>
</Style>
</FlowDocument.Resources>
<Table CellSpacing="3" >
<Table.Columns>
<TableColumn />
<TableColumn />
<TableColumn/>
</Table.Columns>
<TableRowGroup>
<!-- Header row for the table. -->
<TableRow Background="Orange">
<TableCell>
<Paragraph FontSize="12pt" FontWeight="Bold">Code</Paragraph>
</TableCell>
<TableCell >
<Paragraph FontSize="12pt" FontWeight="Bold" >Description</Paragraph>
</TableCell>
<TableCell>
<Paragraph FontSize="12pt" FontWeight="Bold">Amount</Paragraph>
</TableCell>
</TableRow>
<!-- Three data rows for the inner planets. -->
<TableRow>
<TableCell>
<Paragraph>
001
</Paragraph>
</TableCell>
<TableCell>
<Paragraph>
Tax Preparation Fee paid to LOS Taxes
</Paragraph>
</TableCell>
<TableCell>
<Paragraph>
<TextBox x:Name="txtTaxPreperationFee" Width="80"></TextBox>
</Paragraph>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
</FlowDocument>
|
|
|
|
|
FYI, I (and many others) do not even look at code if it is poorly formatted (no tabs) and isn't syntax highlighted. Here is an example of well formatted and syntax highlighted code:
<Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Grid.Column="0" MaxWidth="100">Overwrite</Button>
<Button Grid.Column="1" MaxWidth="100">Skip</Button>
<Button Grid.Column="2" MaxWidth="100">Cancel</Button>
</Grid>
And here's what was typed to get the above to look the way it does:
<pre lang="xml"><Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Grid.Column="0" MaxWidth="100">Overwrite</Button>
<Button Grid.Column="1" MaxWidth="100">Skip</Button>
<Button Grid.Column="2" MaxWidth="100">Cancel</Button>
</Grid></pre>
Basically, you just surround your code with PRE tags and make sure to specify the correct language (in my example, the language was XML) by setting the "lang" attribute to the appropriate value. I got all the ampersands, less than signs, and greater than signs to encode properly by clicking "Encode HTML tags when pasting", which is a checkbox just below the textbox you type messages into. By the way, my above code sample has nothing to do with your question... it's just a demonstration of what is expected from people who ask questions. FYI, you can edit your original post to improve it if you want; you'll be much more likely to get a response that way.
Visual Studio is an excellent GUIIDE.
|
|
|
|
|
Whoops, you got your tags encoded!
|
|
|
|
|
That was my intention. The first PRE block shows what syntax highlighting is and the second shows how to syntax highlight (by using PRE blocks).
Visual Studio is an excellent GUIIDE.
|
|
|
|
|
Interesting, I don't recall having this happen when I've used the <pre> tags in the past. My apologies, I have obviously missed an experience, or maybe my brain hasn't kicked in properly this morning.
|
|
|
|
|
|
If this is an article then please submit it according to the correct guidelines.
|
|
|
|
|
Yes, I am aware of article submission features. Thank you.
|
|
|
|
|
Jammer wrote: Yes, I am aware of article submission features. Thank you.
Then please use them. The forums are for asking technical questions, not for advertising your products.
|
|
|
|
|
Hi,
I want to create auto suggest textbox in my WPF application. In this textbox I want to display the existing user names which matches with the user entered data.
If anyone have idea to solve this, please reply me.
Thanks in advance,
N.Divya
|
|
|
|
|
Perhaps you could create a stack panel that contains a textbox and a popup? And that popup might contain a listview that displays users. You can populate that listview whenever the text in the textbox changes. Although I bet something like that already exists on CP... if not, then you could probably find something by googling a little.
Visual Studio is an excellent GUIIDE.
|
|
|
|
|
I have a folder structure like this....
Project
FolderA
SubFolderAA
Themes
Generic.xaml
ControlAA1.cs
ControlAA2.cs
SubFolderAB
Themes
Generic.xaml
ControlAB1.cs
FolderB
FolderC
I have recently added the folder SubFolderAB and control ControlAB1.cs with a Themes/Generic.xaml file. My control in ControlAB1.cs cannot locate the theme in the new Generic.xaml unless I move the Themes/Generic.xaml to the Project root folder (Project/Themes/Generic.xaml). The controls and styles in SubFolderAA are unaffected by any of this. What could be causing this behaviour?
modified on Sunday, November 22, 2009 4:48 AM
|
|
|
|
|
|
Great link, Thank you
|
|
|
|
|
I am using the WPF combo box in my application. In the combo box, the user can browse through the available items before selecting an item. When user goes through each of these items I want to display a tooltip in a seperate label next to combo box.
So I want to catch that event. Is there such event that fires, when user goes through the items in Combo box before selecting one???
Thanks
|
|
|
|
|
write code on mouse over for each comboboxitem such as
<comboboxitem mousemove="cbi1_MouseMove" name="cbi1">Item1
and code as
private void cbi1_MouseMove(object sender, MouseEventArgs e)
{
string val = cbi1.Content.ToString();
TTLabel.Content = val;
}
when u write code block for each comboboxitem, u get the value which u want to print in separate label
|
|
|
|
|
Thanks Sager.
I got your idea and implemented it successfully.
Thanks again
|
|
|
|