|
Hi
Thanks for your info. Suppose our web application using db(sql) which is there in separate server and accessing db through WCF which is hosted in IIS. if I develop through silverlight its work fine. if want to conver OOB will i get problem? since our company don't want to create another destop application.
Regards
Gopal
|
|
|
|
|
This won't be a problem for silverlight.
|
|
|
|
|
Silverlight can help you avoid update issues that often occur with traditional desktp client type applications.
There are decent workarounds (like click once deployment) to overcome these deployment issues, but if you do not want to get into them, Silverlight can be a good choice.
|
|
|
|
|
You can go with Silverlight...
Regards,
- Kunal Chowdhury ( My Blog)
|
|
|
|
|
OK -- I read through the replies and thought I'd add my 2cents worth.
Silverlight is very good if you have a development staff that is more WinForm-centric but needs to do web development. There is a learning curve for XAML, but it is worth it.
The learning curve for XAML is lessened if you also invest in Expression Blend. I actually feel that you cannot develop Silverlight without it, as it gives you the WYSIWYG interface that WinForm developers lean towards.
The application is stateful even though it is a web app. It also follows much of the WCF construct but uses a lighter-weight framework. The idea is that even if a machine does not have the .NET framework on it, the Silverlight install will implement what is needed. The concept works well in theory but in practicallity you still need the Silverlight Toolkit which also has to be installed on the implementing machine, as this contains controls not in the Silverlight framework.
The previous statement, as you can see, is both a pro and con of Silverlight deployment. Using controls outside of the framework requires some additional installations.
I personally find Silverlight to be the easiest way to deploy web applications without having to learn the 4-inch-thick ASP.NET book. It keeps me more in my knowledge base of service/form development. I also find that I can do better UI development. For example, I have a customer maintenance program where the customer can have 3 different types of data to maintain. Using the Swivel behaviour, I was able to keep the UI VERY clean and gives the user a 'cool' UI experience. Clicking a button to view billing address swivels the customer address around to display the billing address. Clicking the return button swivels things back.
|
|
|
|
|
I am developing my first WPF app. It has some animations are essentially the same, but with different targets. I want to stagger their execution so they look random. I developed a storyboard for each target and gave each sb a unique name. To insert the delay, I am calling the storyboards from the code-behind. For testing I am using a button for my trigger. Eventually, form_load will trigger the animations. Also for testing purpose, I am only trying to run two storyboards, begin the 2nd one 8 seconds after the first.
My problem is that my storyboards both execution at the same time. After clicking the button, there's an 8 second delay and then they both run. I've tried separating the storyboards in two separate sub's. I've tried dimensioning individual storyboard variables. So far nothing seems to make a difference. I am sure this should be possible. In fact I imagine it's fairly common.
Any help will be appreciated. See code below...
Imports System
Imports System.IO
Imports System.Net
Imports System.Windows
Imports System.Threading
Imports System.Windows.Media
Imports System.Windows.Media.Animation
Imports System.Windows.Navigation
Class Window1
Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
'Call RunStoryBoard("GrowDrop1")
Call RunStoryBoard1()
'Thread.Sleep(800)
Call Delay(8000)
'Call RunStoryBoard("GrowDrop2")
Call RunStoryBoard2()
End Sub
Private Sub RunStoryBoard(ByVal sbName As String)
Dim myStoryBoard As Storyboard = DirectCast(FindResource(sbName), Storyboard)
myStoryBoard.Begin(Me)
End Sub
Private Sub RunStoryBoard1()
Dim myStoryBoard1 As Storyboard = DirectCast(FindResource("GrowDrop1"), Storyboard)
myStoryBoard1.Begin(Me)
End Sub
Private Sub RunStoryBoard2()
Dim myStoryBoard2 As Storyboard = DirectCast(FindResource("GrowDrop2"), Storyboard)
myStoryBoard2.Begin(Me)
End Sub
Public Sub Delay(ByVal Milliseconds As UShort)
Dim DelayTime As TimeSpan
Dim NewTime As DateTime = DateTime.Now.AddSeconds(Milliseconds / 1000)
Do
DelayTime = NewTime.Subtract(DateTime.Now)
Loop While DelayTime.Seconds > 0
End Sub
End Class
|
|
|
|
|
I think I solved my own problem.
Rather than trying to run multiple storyboards, each containing animations for a single target, I tired putting all of the animations for all of the targets into a single storyboard and arrange them on the timeline so they appear to fire in a random order. That seems to be working fairly well.
My only issue now is how to set it up so it runs continuously. What complicates this is that each target has 3 animations associated with it. Each target is a droplet. The first 2 animations are an X and a Y scale transformations, to make the droplet grow. The third is a translate transformation as the droplet falls down the screen. I use this set of 3 animations for each of the droplets. I am not sure yet how to set this up so the animations for a target are repeated automatically in the proper sequence.
If anyone has an ideas on this, again I would appreciate the help.
|
|
|
|
|
I want to develop an application with Menus and Sub menus using WPF.
File (Main menu)
New (Sub menu)
Save (Sub menu)
In Windows Form application i created MDI parent form, on click on "Save" button i would display another Form(child) within the MDI parent Form.
I want to achieve similar functionality with WPF. Do i need to create User Control and on click of "Save" button display the User control?
Or is there any other way i can achieve this.
I'm new to WPF. Please let me know
Thanks
|
|
|
|
|
Hello all of you,
I have a problem and would be glad if you could help me.
What I need to know is how to archieve UserControl inheritance with VB. I found some samples how to do this with C# and all of them work fine with C#. But when I try to translate this in VB I get an error (namespace not found) in my UserControl-XAML.
e.g. this link, Variant 1:
http://svetoslavsavov.blogspot.com/2009/09/user-control-inheritance-in-wpf.html
It seems to be easy in C# and impossible with VB.
This is my approach:
1) the class "TestBaseCtrl.vb"
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes
Namespace UserControlInheritance
Public Class TestBaseCtrl
Inherits UserControl
End Class
End Namespace
2) the UserControl "InheritedUserControl.xaml"
<local:TestBaseCtrl x:Class="UserControlInheritance.InheritedUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:UserControlInheritance"
Height="300" Width="300">
<Grid>
</Grid>
</local:TestBaseCtrl>
3) the code-behind "InheritedUserControl.xaml.vb"
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes
Namespace UserControlInheritance
''' <summary>
''' Interaction logic for InheritedUserControl.xaml
''' </summary>
Partial Public Class InheritedUserControl
Inherits TestBaseCtrl
Public Sub New()
InitializeComponent()
End Sub
End Class
End Namespace
My (german) error message is the following:
"Der local:TestBaseCtrl-Typ wurde nicht gefunden. Alle Assemblyverweise müssen vorhanden sein, und alle Assemblys, auf die verwiesen wird, müssen erstellt worden sein."
in english something like this:
"The local.TestBastCtrl-type was not found. All assembly references have to exist and all assemblys, that are referenced, have to be built."
--> It seems to me that the compiler does not find the class in my namespace but I can assure that the namespace is as correct as it is in the C#-project.
Your help would be very much appreciated!
I need a UserControl to inherit from, there are several functions that should be integrated in all of my forms and I do not want to implement them in every form I want to create.
If I get this working, I hope that this kind of UserControls will still be working within the CAL (Composite Application Libary)-Framework, but this will be another story for another day...
|
|
|
|
|
hi guys
i am hosting my wcf service in IIS5 ,but it gives me an error like
An error occurred while trying to make a request to URI 'http://tauseef-pc/wcfhost/Service.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.
my wcf service is hosted on iis in a seperate asp.net project and my policy file is
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers= "*">
<domain uri="*" />
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
any help please ...................
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
Make sure the policy file is named "clientaccesspolicy.xml".
Make sure the file is located in the folder of the domain's root
(the physical folder "http://tauseef-pc" maps to).
What happens when you navigate to http://tauseef-pc/wcfhost/Service.svc
in a browser?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
oh i got it,
actually i put it on the root of application so it was getting error .
now when i have changed its location to domain root i am getting another error
while debugging it.
"The remote server returned an error: NotFound."
any help please........
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
I would first try to navigate to http://tauseef-pc/wcfhost/Service.svc
in a browser.
If that doesn't work - what's in the web application's web.config file?
If it does work, then maybe just the client side service reference configuration
needs adjusting.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
ok , things are working now, but with a little change, the problem is in my method which returns array of type Employee, i came to know i tested it with another method which just returns a string and its working
and the same error still there upon the call of GetEmployeeDataMethod() which returns an array of type employee.
any help please ?
public Silverlight_UI.Service.Employee[] EndGetData(System.IAsyncResult result) {
object[] _args = new object[0];
//error on this line Silverlight_UI.Service.Employee[] _result = ((Silverlight_UI.Service.Employee[])(base.EndInvoke("GetData", _args, result)));
return _result;
}
//my service code
public Employee[] GetData()
{
using (AdventureWorksDataContext dataContext = new AdventureWorksDataContext())
{
DataLoadOptions dlo = new DataLoadOptions();
dlo.LoadWith<employee>(m => m.EmployeeAddresses);
dlo.LoadWith<employee>(m => m.Contact);
dlo.LoadWith<employeeaddress>(m => m.Address);
dataContext.LoadOptions = dlo;
var list = from emp in dataContext.Employees
select emp;
return list.Take(10).ToArray();
}
}
it just give me error when i call any method which calls my locadatabase ,i have created a user for apnet ,
but i dont know what to do?
regards.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
okh, i got it but still thanks.
actually i debug it through flidder and got that there was user permission issue about aspnet user.
i chnaged this user to public and dopwner and now its working.
can you please explain a bit about ?
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
Tauseef A wrote: can you please explain a bit about ?
Every process runs as a user identity - that's how the
OS knows what rights/priviliges a process has.
If your database is using Windows authentication then it is using the
user identity of the process calling it. That identity,
therefore, needs the correct permissions for any database tasks it
intends to perform.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
thanks.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
Hi
i was working with ScreenSpaceLines3D (Part of 3DTools for WPF)
and to draw this object i must to add it to Viewport3D.Children which is Visual3DCollection
when i add the object to that collection then remove it it throw a 'NullReferenceException'
the exception was thrown by a method inside the class which is UpdateTransform() in OnRendering eventHandler
cold someone help in this ?
and the other problem that i can not replace ScreenSpaceLines3D with
any thing i must use it
Sample of what happens :
<pre>
Viewport3D viewport;
ScreenSpaceLines3D screenSpaceLines3D;
public void AddLine()
{
screenSpaceLines3D = new ScreenSpaceLines3D();
screenSpaceLines3D.Color = Colors.Blue;
screenSpaceLines3D.Points.Add(new Point3D(0, 0, 0));
screenSpaceLines3D.Points.Add(new Point3D(10, 10, 10));
screenSpaceLines3D.Thickness = 1;
viewport = new Viewport3D();
viewport.Children.Add(screenSpaceLines3D);
}
public void RemoveLine()
{
if (screenSpaceLines3D != null)
{
viewport.Children.Remove(screenSpaceLines3D);
}
}// The exception appears her
</pre>
|
|
|
|
|
is it possible to add transparency to an ModelUIElement3D
ive made a cube and a pie but want to make them transparent..
|
|
|
|
|
Sure - just apply a transparent brush. Brushes provide an alpha component just for this type of case.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi Guys,
Im currenlty a Vb.net developer.
I wanna learn how to use the above technologies.
Which book or site would you suggest should be read to get started!
thanks
Anoop
|
|
|
|
|
Don't know about books, but there's lots of info here:
.NET Framework 3.5[^]
All this same info is in the local help in Visual Studio as well.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello Friend,
For WPF you can see following book.
Windows Presentation Foundation Unleashed, SAMS publications, Author : Adam Nathan
For WWF, Version 4.0 is totally different than version 3.5 . We can say that Microsoft has changed WF totally in 4.0 . And currently no book is available for 4.0 . But you can get Beta2 of WF 4.0 and samples from Microsoft side.
|
|
|
|
|
Hi,
I am working on a WPF application. I want to place table with some lable controls in my form to display data. For this I tried the folowing code.
<FlowDocumentReader Margin="131,133.738,184,217.262" ScrollViewer.HorizontalScrollBarVisibility="Hidden" >
<FlowDocument >
<Table CellSpacing="3" >
<Table.Columns>
<TableColumn Width="80" />
</Table.Columns>
<TableRowGroup>
<!-- Header row for the table. -->
<TableRow Background="Orange">
<TableCell>
<TextBox x:Name="txtTransmiterFee" Width="80" LostFocus="txtTaxPreperationFee_LostFocus"></TextBox>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
</FlowDocument>
Here I am getting some extra features for zooming, scrollbar etc, but I want just a table.
If any one have any idea to place a table control in WPF or amy modifications in this code to display just like a table, please reply me.
Thanks in advance.
|
|
|
|
|
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++
|
|
|
|