|
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
|
|
|
|
|
Is it possible to bind different enums to one DataGridComboBoxColumn?
I need to display a couple of physical properties like temperatur, pressure, weight in a datagird. All these physical properties have a name, a physical unit and a value.
<br />
Public Class physicalProperty<br />
<br />
Public Property name() As [Enum]<br />
Get<br />
....<br />
End Get<br />
Set(ByVal value As [Enum])<br />
...<br />
End Property<br />
<br />
<br />
Public Property unit() As [Enum]<br />
Get<br />
....<br />
End Get<br />
Set(ByVal value As [Enum])<br />
...<br />
End Property<br />
<br />
<br />
Public Property value() As double<br />
Get<br />
....<br />
End Get<br />
Set(ByVal value As double)<br />
...<br />
End Property<br />
<br />
End Class<br />
Each row of my datagird should show one physical property. The first column displays the name, the second the unit and
the third the value of the phy. property.
I would like to be able to change the unit in the datagrid with the help of a combobox.
All solutions I found for binding a enum to a datagridComboboxColumn used a ObjectDataProvider to set the itemssource for the datagridCombobox:
<br />
<ObjectDataProvider MethodName="GetValues"<br />
ObjectType="{x:Type sys:Enum}"<br />
x:Key="AlignmentValues"><br />
<ObjectDataProvider.MethodParameters><br />
<x:Type TypeName="namespace:myEnum" /><br />
</ObjectDataProvider.MethodParameters><br />
</ObjectDataProvider><br />
<br />
But I don't have one enum. I have for each physical property one enum ( temperature (K, C, F), pressure (bar, Pa), weight (kg, g)).
Maybee I can use one enum for all physical units and dispaly only the valid ones by filtering?
Is there a way to meet my requirements?
reibor
|
|
|
|
|
Well, you're not using the MVVM pattern. You should implement the MVVM pattern when you're using WPF (although you sometimes can take shortcuts and not implement the necessary parts to get the job done).
You can learn about MVVM from the links I posted here[^].
So I suggest you create a class PhysicalPropertyViewModel that has the following main properties
- a property AvailableUnits that returns the available enum values for the property (to feed the combobox)
- and a property SelectedUnit that is bound to the SelectedItem of the combobox
when is set, it changes the DisplayValue property value accordingly
- a property DisplayValue which is the value to display according to the selected measurement unit
The TreeView article is how I initially understood most of the MVVM concept. Go read it and then read the MSDN Magazine article. Then read this reply again. After this, if you don't understand what I mean, tell me and I'll try to be more clear. Have a nice day.
Eslam Afifi
|
|
|
|
|
Thanks Eslam Afifi, your suggestion to create a property AvailableUnits was the food for thought I needed. It works perfectly.
I am not quite sure if I actually use something like a MVVM pattern. I have a wrapper class for the binding to the GUI. Extended by the AvailableUnits property it works.
Thanks for your help.
reibor
|
|
|
|
|
Glad to help. What you're doing is similar to (if not actually is) the MVVM pattern. MVVM is short for Model-View-ViewModel. A ViewModel is basically a wrapper around a Model for a View to expose the model's properties to the view and to pass commands from the view to the model.
Eslam Afifi
modified on Sunday, November 22, 2009 4:45 PM
|
|
|
|
|
Hi,
I wish to know how can one traverse through items inside a Listbox in WPF. Basically I wants to access the checkbox inside the template.
WPF Code:
|
|
|
|
|
Using the MVVM pattern can help in virtually all cases avoid stuff like that. Please see this post[^].
But if you really need to get it done the way to described, the ListBox has a property called Items. Then for each item, you can access it's visual tree and search for the element you want by its name using the FindName method (I'm not fully sure about that since I did this kind of stuff only once when I first started learning WPF).
P.S. stepping into the debugger and seeing the items' structures using the Immediate Window or a debugger visualizer like Mole[^] can help you get this done quickly.
Eslam Afifi
|
|
|
|