|
I do and when I checked it wasn't there, like 2 days ago. I see it's there now so thanks.
|
|
|
|
|
Pete O'Hanlon wrote: if you've got MSDN, Blend 3 RTM is available to download now
Thanks! That slipped under my radar
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
We need to host MS Office applications(integrate) in WPF. I tried web browser but that supports only PDF hosting.
Then there is DSO Framer control, but that uses Windows host as root element. There we loose some flexibilty(Like dynamic resizing of window etc.).
Is there a better way out
Thanks
|
|
|
|
|
amit_1986 wrote: I tried web browser but that supports only PDF hosting
No it doesn't. It's just a standard web browser - if you can open your document in IE, you can open it in the web browser component.
"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
|
|
|
|
|
I have a bunch of 3D models that gets rendered on startup. I can easily select any model using Hit Testing. My question is, how can I rotate the selected model using the directional keys on the keyboard?
|
|
|
|
|
Set a RotateTransform3D on your model and implement a command handler that works out which key was pressed and updates the transform as appropriate.
"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,
We have a web server which sends data to online application and client wpf application to render some controls.
The dimensions of controls is set by server in pixels. Controls are rendering fine in online application, but in client wpf application controls are rendering with very small dimensions. Is there any conversion factor to render wpf controls using pixels dimensions which work just fine for web application?
Any help will be useful.
Thanks
|
|
|
|
|
|
Collin Jasnoch wrote: Is it possible to have a template in a library and use it in my app?
If so how do I find it and use it?
There's a variety of methods. Understanding how WPF uses
resources may help you choose an appropriate solution...
Resources (WPF)[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
When I am trying to access the RSS feeds from silver light I am getting System.Security. Security Exception. For resolving this I places crossdomail.xml and clientaccess.xml files in my application and tries. But they didn’t worked and I am getting the same error for some websites.
If anyone have any idea how to use them or place them in an Silverlight application please reply me. Please reply me soon. Its urgent.
Thanks in advance.
|
|
|
|
|
If you are accessing the feed which is outside of your website then crossdomain.xml and clientaccesspolicy.xml should be hosted on that sites.
For example:
Your Silverlight website is http://mycoolsilverlight.com and the feed that you are accessing is http://anotherwebsite.com. So, you should be able to access
http://anotherwebsite.com/crossdomain.xml or http://anotherwebsites.com/clientaccesspolicy.xml
Hope it helps.
|
|
|
|
|
I have a lot of Services running.
And all of them are written in sync way.There is no async operation pattern at all.
Silverlight 3.0 client is one of many clients for this services.
All other clients work pretty well with sync operations.
I have to generate SL proxy for this services.
I do not want to use AddServiceReference.
I want to use ChannelFactory to create proxy.
When i write ChannelFactory<IServiceRegistrar> cf = new ChannelFactory<IServiceRegistrar>(new BasicHttpBinding(),
new EndpointAddress("http://localhost:5545/Registry"));
i have exception saying that IServiceRegistrar contract does not support async pattern.
How can i create proxy for sync wcf service contract manually in SL?
|
|
|
|
|
pioner wrote: all of them are written in sync way
What do you mean by "all of them are written in sync way"? what is "sync way" in writing the web services?
Having sync or async method is totally depend on how you generate the proxy class.
All versions of Silverlight don't support "Sync" calls because Microsoft doesn't want the browser to be freezed. So, all calls to Web services must be "async" calls.
Hope it helps.
|
|
|
|
|
pioner wrote: How can i create proxy for sync wcf service contract manually in SL?
It doesn't matter if the service operation is implemented sync or async on the server.
Silverlight is on the client end independent of the server, and service operations
MUST be implemented async in Silverlight. That means specifying AsyncPattern=true
on your OperationContractAttributes and implementing your interface methods with the
BeginOperation/EndOperation pattern.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: That means specifying AsyncPattern=true
on your OperationContractAttributes
It's not really necessary to apply this attribute in OperationContractAttributes. You can just tick "async" when you are generating proxy.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
Microsoft MVP (Silverlight), WPF/Silverlight Insiders
|
|
|
|
|
Michael Sync wrote: You can just tick "async" when you are generating proxy.
Right. The OP specified "How can i create proxy for sync wcf service contract
manually in SL?" so I assumed (s)he was doing it manually.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks, Mark.
If I remember correctly, SVCUtil.exe can't be used for generating the proxy class for Silverlight from command-line. It wasn't supported until Silverlight 2 release. (but there are some workarounds like that "link[^]" )
I will check whether we can generate the proxy class for Silverlgiht from commandline in Silverlight 3 or not.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
Microsoft MVP (Silverlight), WPF/Silverlight Insiders
|
|
|
|
|
Yes. Generating the proxy from commandline using SlSvcUtil.exe is supported in Silverlight 3 C:\Program Files\Microsoft SDKs\Silverlight\v3.0\Tools.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
Microsoft MVP (Silverlight), WPF/Silverlight Insiders
|
|
|
|
|
I meant I assumed the OP was hand-writing the service proxy code
I appreciate the info though!
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: It doesn't matter if the service operation is implemented sync or async on the server.
Silverlight is on the client end independent of the server, and service operations
MUST be implemented async in Silverlight. That means specifying AsyncPattern=true
on your OperationContractAttributes and implementing your interface methods with the
BeginOperation/EndOperation pattern
implementing your interface methods with the
BeginOperation/EndOperation pattern
What interface??? I have only one interface on server side.It marked with ServiceContract attribute.
No more interfaces except generated by svcutil(if i use it)
And that serverside interface and it`s implementation=wcf service,it doesn`t contain ANY async pattern methods.
When i write wcf service i don`t want to think "Oh my client will be sl application,then i need async pattern for my methods".
So how can i generate proxy for such a contract without using svcutil.
It`s not possible to use ChannelFactory because it creates sl proxy only for service contracts with async pattern methods.
|
|
|
|
|
Is there any reason why you don't want to use svcutil or "Service Reference"?
We have a lot of WCF services that are consumed by WPF, Silverlight and ASP.NET 3.5 in our project. We don't implement any BeginOperation or EndOperation or any sync or async pattern.
The "async" option is ticked by default when we are generating the proxy for Silverlight so we can use the code like service.GetDataAsync() and service.GetDataCompleted automatically.
But we don't tick "async" option when we are generating the proxy for WPF and ASP.NET so we can use service.GetData(); ...
I would like to know more details about why you don't want to use "Service Reference" or svctil utility.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
Microsoft MVP (Silverlight), WPF/Silverlight Insiders
|
|
|
|
|
Michael Sync wrote:
I would like to know more details about why you don't want to use "Service Reference" or svctil utility
We have some kind of repository of wcfs.And it dynamically adds and removes wcfs.
So client can ask repository for service proxy knowing only service contract.And repository should generate proxy manually.
Repository will generate proxy with sync methods for all clients except silverlight and should generate proxy for silverlight with async methods.But because all is dynamic we cant use Add Service Reference.
|
|
|
|
|
I am doing most of my WCF services "near" sync in Silverlight 3 based on this article Synchronous Web Service Calls with Silverlight 2: Dispelling the async-only myth[^].
Basically I add the service reference as per normal, then generate the channel factory as below:
ThreadPool.QueueUserWorkItem(delegate
{
var channelFactory = new ChannelFactory<IDataService>("*");
var dataService = channelFactory.CreateChannel();
var asyncResult = dataService.BeginSaveMethod(dataObject, null, null);
newInfonMachineActiveDefinition.Id = dataService.EndSaveMethod(asyncResult);
if (Dispatcher.CheckAccess())
{
Visibility = Visibility.Collapsed;
}
else
Dispatcher.BeginInvoke(delegate
{
Visibility = Visibility.Collapsed;
});
});
NOTE: I have not shown any exception handling here to keep the code simpler
It is important that you call the Dispatcher from the same thread that is executing the "sync" call else your UI is not going to wait for the call to finish...
This approach has one major downside, the call must be done form code behind of the control and not from a proxy class in your client, but you can try to refactor it to pass a delegate to your proxy class that will be called from the Dispatcher, or something like that...
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
use syncwcf library from codeplex: http://syncwcf.codeplex.com it doees exactly what you need: allows to use the sync-style service interface without writing nor generating code for them
|
|
|
|
|
Hi all,
I have a simple listview that has a currently selected item binding as follow:
<ListView HorizontalAlignment="Left" Width="300" Name="ServiceListView" SelectionChanged="ServiceListView_SelectionChanged" SelectedValue="{Binding CurrentlySelectedService}" Grid.Row="0" Grid.RowSpan="2" Grid.Column="0">
<ListView.View>
<GridView>
<GridViewColumn Header="Machine">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Label x:Name="ServiceNames" Content="{Binding ServiceController.MachineName}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Service Names">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Label x:Name="ServiceNames" Content="{Binding ServiceController.ServiceName}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Service status">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Label Width="80" x:Name="ServiceStatus" Content="{Binding ServiceController.CurrentStatus}" Background="{Binding ServiceController.ServiceStatusColour}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
And obviously in the constructor I do the following to enable bindings:
DataContext = this;
The problem:
The binding to SelectedValue="{Binding CurrentlySelectedService}" works 100% (well, sort of).
In my DEV environment it works 100% and the currently selected item works 100%.
But for some or other reason when I deploy this to a Windows server 2003 box (with .Net 3.5 installed), the binding doesn't work anymore...
How can I debug this issue?
Has anyone experienced this problem before?
This is not my first time experiencing this problem. I've seen this a few times now, but it seems to be very PC specific. It will work 100% on one pc, and then completely FAILS on another.
Any help would be much appreciated.
|
|
|
|