Frame based animation jumpy, fix? Using the CompositionTarget.Rendering event ensures you get a callback at every possible render, and makes no optimizations for you.
If you update yoru application to use the built in WPF animations per the sample above, WPF will do the work to help make the animation as smooth as possible while running Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Panel that can repeat items Have a look at wrappanel. See if that's what you want Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
WCF Hosting multiple instances of the same type via configuration Hello,
Thank you ahead of time for your brain cycles J ¡
I¡¯m in one process space. But I want to host multiple servicehosts in that space.
Each servicehost will run a service instance I instantiate in code and provide to it.
Foreach(¡
Servicehost(myServiceInstance);
Each instance of ¡°myServiceInstance¡± will be of the same type just a different instantiation.
At first glance you might think of endpoints but endpoints are really just different communication paths hosted by the servicehost into the same instance.
I can what I want with custom code already.
My problem is doing it all from configuration. The problem lies in the fact that when you set up a you config
<Service name=¡±namespace.type¡±
Is used to map the instance you fed into servicehost with its respective configuration information.
But since I¡¯m using many instance of the same type into different servicehosts in the same process space, how does
WCF differentiate between them
With custom code I can give them different base address or different endpoint addresses into different servicehosts.
Configuration seems limited in this regard.
Does anyone know any way around this
Thanks. Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
How to realize, if my own dependency property is already registered? Hello,
thank you for your reply.
Yes, I know, but problem is more complex. How I have written, problem is, that I do not know nothing about order of instantiation my forms. One form is one separated DLL. I develop thin client a it gets DLLs via MSMQ or webservice or so... I do not know, when it is the first time and when it is time for AddOwner...
I must have look to AddOwner, but I'm afraid that is not it...
MyOriginalClass.MyOriginalProperty.AddOwner My original class is a Button. But MyOriginalProperty It is not original property, it is my own added dependency property, StyledContent. I'm a little bit confused...
Thank you
RostaB Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
how do i make use of Cider? hello,
im running the VS.NET 2005 C# express edition, and ive downloaded the .NET 3.0 plugins (which afaik, includes Cider). i am able to create a new XAML-based windows app, and work w/ it in xml/tag mode.
but i thought there was a visual editor for the Cider release how do i switch to its view/editor
thanks, matt Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
ListBox keyboard focus. Why does it work this way? I have a simple listbox like this:
< ListBox Name ="l">
< ListBoxItem > 1 </ ListBoxItem >
< ListBoxItem > 2 </ ListBoxItem >
< ListBoxItem > 3 </ ListBoxItem >
</ ListBox >
After the window it is in is loaded the I run the following:
l.SelectedIndex = 1;
l.Focus();
Now visually I can see that the 2nd item is selected. But if I press the down arrow on the keyboard the 1st thing that happens is that the selection jumps up to the 1st item (index 0) not down to the last item. Then after this it will go up and down as expected.
Why does this happen Can I do something to correct it Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
SiteOfOrigin, Parse Error Ah, I think I understand your issue here. The other bug you caused me to find is just a bonus then
Unfortunately, for Cider to work correctly, it needs to know about all the resources accessed by the application. As you said before, the application runs correctly, you just lose the designer. Including the images as loose content with "Copy If newer" or "Copy Always" is an easy way to work around this. The folder structure seen in the Solution Explorer is preserved in the output folder, so just make sure you see your pictures under "Data", include them as content to be copied, and your siteoforigin syntax should work w/ Cider.
One issue you might hit is if you are using ClickOnce to deploy your application (i.e. generating a .application file for app deployment). In this case, if you want to change these images later the application will be invalidated, since it will check the hashes of any file included as content. If so, then simply include them as content until you finish developing the app, then remove them as content when publishing the final version so the hash is unimportant. If you are simply running an executable, this caveat doesnt matter.
-Matt Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Why extensions methods require reference to System.Core.dll? To be thorough, your code should really look like this...
Code Block
namespace System.Runtime.CompilerServices { /// <summary> /// Enable C# 3.0 extensions. /// </summary> [AttributeUsage(AttributeTargets.Method)] public sealed class ExtensionAttribute : Attribute { } } Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Passing application context information to servies Hi,
I am got the following situation and would love to hear peoples feedback on whether i am doing this in the correct way for WCF.
Currently our application has its own context class similar to HttpContext and is accessed using the Current property. This class contains a number of properties such as ClientName, ApplicationName, Status etc etc. We would like to be able to pass this information over the wire to our remote services hosted in WCF, but we dont want to have to explicitly the information on every method call.
My current thinking to have a class that implements the IClientMessageInspector and IDispatchMessageInspector interfaces. In the IClientMessageInspector .B eforeSendRequest i take the current context and then create a new message header for it, this is then added to the request headers collection.
On the service side the IDispatchMessageInspector .AfterReceiveRequest looks for the header and moves it into the understood headers collection. The context object then has a method in it to look through the current OperationContext's understood headers and the deserializes the appropriate header.
Can anyone comment on this approach, the pros and cons of it or whether is a better way of achieveing the same things
Thanks
Dave Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Calculating the actual text size on the screen Thanks for this approach as well... mcuh more easier than the creating formatted text. Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Vertical Menu Hi guys, I m looking to build a menu in WPF which looks exactly like the menu on the left used on the MSNBC website. http://www.msnbc.msn.com/ I tried using the following markup to generate a menu. But I ran into a few problems here- a. I had to click on "AAA" menu item before I was shown the child menu-item "BBB". b. I was not able to show the Black Arrow for the "AAA" MenuItem. <Menu Grid.Row="1" Grid.Column="0" Width="100"> <MenuItem Header="AAA" > <MenuItem Header="EEE"/> </MenuItem> <MenuItem Header="BBB" /> <MenuItem Header="CCC" /> <MenuItem Header="DDD" /> </Menu> The MSNBC menu has the following properties: a. Menu Items are stacked up vertically. b. Menu Items that have child Menu Items show an arrow. c. Child Menu Items are exposed upon hovering over the parent menu item. Thanks! Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
GetChanges Hi again,
Can someone please post some simple code(VB ) illustrating the use of the GetChanges method of the syncprovider class so as to retrieve the dataset of changes
Thanks ,
Kce Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
XBAPs and Loose XAML does not work on corporate PCs Hi, We have that same problem on our corporate PCs too. Which company are you working for (in case you can tell :-) Do the words "CAT PC" mean something to you :-) We found out that it helps if you turn off the Advanced text services (in XP: Control Panel / Regional and languages options / Languages / Details / Advanced / Turn off advanced text services). We also found out that we don't have this problem on Vista. Unfortunately, the "text services" trick doesn't solve all our problems. Our strategy (after a looooong unfruitful search) is to blame management and IT, and to use Vista for XBAPs. Greetings, Laurent Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Canvas rendering performance problem One of our requirements is to display 200*200 rectangles in one panel and update all of them around every 20/30 seconds in real time. Each rectangle has a different color. The performance requirement for display is around 1-2 seconds.
I'm currently using DrawingContext in my WPF control and calling DrawRectangle API in a loop. Later I displayed it as an image on canvas. Something like this:
SolidColorBrush sb = new SolidColorBrush(color[0]);
using (DrawingContext drawingContext = dGroup.Open()) { for (int ii = 0; ii < 200; ii++) { double x = width * ii / 200;
for (int jj = 0; jj < 200; jj++) { double y = height * jj / 200; sb.Color = color[[ii * 200+ jj]; drawingContext.DrawRectangle(sb, null, new Rect(x, y, recWidth, recHeight)); } } }
Image theImage = new Image(); DrawingImage dImageSource = new DrawingImage(dGroup); theImage.Source = dImageSource;
this.m_canvas.Children.Add(theImage);
The problem is the render performance seems slow, the CPU keeps 100% usage for nearly 10 seconds to complete the rendering. I heard WPF has hardware acceleration but only available under some circumstance. I'm using a laptop with Nvidia Quadro FX Go1000 graphic card of 128M memory. The Direct X version is 9.0. So in my case of using Canvas and rectangles in a 2D scenario, can better hardware speed my app up, or is there any other optimization I can do from my app side Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Return large result sets using WCF with wsHttpBinding Hi,
We are developing a new financial solution using WCF as communication programming model, in order to be accomplished with new customer requirements: SOA and interoperability.
We have some WCF services (.svc) published in an Win2003/IIS6 server providing corporative services for some client applications. Since these client applications functionalities are built using composition of corporative services, all services are configured to use wsHttpBinding because we are using new transaction flow feature and also to guarantee interoperability with other WS* consumers.
We are having problems when some services must return large results to client applications like financial transaction lists to be processed by those.
We have already tried to configure these services with "Mtom" message encoding instead of "Text", we increased maxReceivedMessageSize parameter. We have done other configuration changes like defining readerCotas parameter, increase
closeTimeout, sendTimeout, openTimeout parameters and nothing what we have done is making difference.
When a list returned by services is larger than 1000 registers the exception below was thrown:
An existing connection was forcibly closed by the remote host.
Could someone help us Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Tree View I think the misunderstanding here is with Grid. Grid does not work well as an ItemsPresenter since it will not automatically generate rows or columns for you and will not set the row or column incrementally for each child. Try using a StackPanel instead to get things started and working before trying to get the centering described in the comments.
Since you seem to be getting a root, I'll assume that the data is being hooked up somewhere, but from the XAML, I don't immediately see where the data from the resource dictionary is being applied as the items or ItemsSource for the TreeView. Maybe I'm just not seeing it, though.
Ben Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
comsvcconfig - problem with com+ component that contains more than one interface Im hosting my wcf service under com+.
everything works find untill I try to install a contract (com+ interface) that belongs to a com+ components that have more than one interface.
when I start the component service (in component services) it generates an error. (the process cannot be started).
all the rest of the components work fine. (if they have only one interface)
does anyone have an idea what could be the reason for this Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Consuming a Service in the self-hosted application! Good afternoon fellows, i have a little question, it shouldn¡¯t be a problem to all the experts that come to this forum. ;D
What i want to know is this: I have a Windows Forms application that consumes some WCF Services that are exposed using WebServices. That works great. YHUUUUUUU... But its a really anoying proccess to debug it (every time i have to attach the Visual Studio Debugger to the aspnet_wp manually). So what i was thinking it was depending on the binding configuration in the app.config (debug) i would use these services in a self-hosted environment or web services. I could host the service in my Windows Forms application, but the problem is, i can¡¯t understand how i consume this service.
To consume a WCF service normally its used a proxy class, and normally this proxy class is generated using svcutil.exe. I could generate the proxy class connecting to the Web Service Host and then was thinking in changind the config that the svcutil.exe generated, so it would use the Windows Form Host. But i don¡¯t really know HOW to do this.
Do i have to use the NetTcpBinding for this feature Because as far as i know i have to do some kind of mapping soh when a client tries to connect to the service address, the call is transfered to my Windows Forms Application hosting the service.
If anyone has another idea to surpass the "attach to proccess" thing i would be really glad too.
Im using Windows XP Pro SP 2 (developer machine, since this feature its only "required" at develop/testing times)
Thanks anyway. :D Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Beginner's question on WCF + MSMQ (party regarding the MSDN examples) Hello there,
I'm currently trying to get my hands dirty with WCF. I pretty carefully studied all the various examples which come with the VS 2008 MSDN release. My (really just my ) problem is as follows: all examples I've seen so far strictly divide a WCF communication pair into a client and a service. Worse, there's no shared contracts neither data nor services/operations. After building and hosting a service, all the examples use svcutil.exe to generate the client stubs. This generated code implements the same contract as the service, but in a pretty different way which leads to funny code like the service calling the client's "sendXyzRequest" method.
For my tiny brain, a better approach would be a central point (assembly, whatever) which defines the data and service contracts and which both the client(s) and the services share by referencing this authority. Furthermore, even the implementations could be in one single place. For a request/response service you'd get a pretty straightforward sequence of method calls: client sends the request, service receives the request, service processes the request and creates an appropriate response, service sends the response, client receives the response. In a clean implementation, you'd completely hide any service.XYZ() calls within the client's code and vice versa.
BUT, in order to do this, there may be only ONE acmeClient.SendOrder() method, ONE acmeService.ReceiveOrder() method, ONE acmeService.SendOrderConfirmation() method, and ONE acmeClient.ReceiveOrderConfirmation() method, thus TWO classes which have to be the SAME TWO classes at the client and at the service, while the examples deal with four classes which only partly implement the contracts, but the "client's client side" and the "service's client side" implement the same contract's parts in different ways. At least to me this looks pretty ugly.
If anybody knows some examples which reflect my babble I'd be thankful for any hints. Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
VS 2005: problems with running C++ programs Hi, The purpose of the "scanf" is to stop the program from exiting after it prints "Hello world" because it's waiting an input from the keyboard. If you run the program from within the IDE and without the "scanf", the program prints "Hello world" then prints, "Press any key to continue..." But if you run the program by double-clicking the resulting stand-alone ".exe" file (and without opening a DOS console), it runs within a split second then exits. That's why you don't see any output. Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
A couple LINQ To Entities questions Zlatko,
Thanks for the detailed reply. I'm thinking I like the TPT method, but I'd like to read more on this. Can you suggest a book or article or something to read that will dig into this more deeply
I'm not sure I completely understand why I only need a timestamp in the base class in TPT. If all I'm doing is updating a derived class (say, company), I would write something like this:
UPDATE Company SET Name = @Name WHERE ContactID = @ContactID
But I don't have a timestamp to compare against. I realize there's a timestamp in the base (Contact) table, but I'm not updating that one. How can I write
UPDATE Company SET Name = @Name WHERE ContactID = @ContactID AND <Contact's TS> = @TS
-Eric Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
How to hide the 'cube' where the listboxes meet ? Hello, you can create a ControlTemplate for ScrollViewer. The default ScrollViewer¡¯s template contains a ScrollContentPrensenter, two ScrollBars, and a Rectangle. They¡¯re hosted in a 2*2 Grid. The cube you see is exactly the Rectangle. You can delete this Rectangle in your own template, put some fancy elements in the 2 row, 2 column, or do whatever you like.
For your second question, no, you can¡¯t. Value is not a DependencyProperty. You can¡¯t use data binding on it¡ Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
How to access sharable data between WCF Client and WCF Service Hi Zhihao,
Take a look to one of my articles in codeproject, http://www.codeproject.com/WCF/WSI18N.asp . I used the same approach to pass culture settings to the service, you can use the same idea to pass your data.
Regards,
Pablo. Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
WCF Authenticating users from Database hello all
I have a simple scenario. I need to implement security with WCF . I have a database on my service side which acts as the user store. I want to pass credentials from the client, access and perform authentication on the service from my database. I don't want to use authentication against windows users.
how can i implement this using tcp and http. what sort of security should i apply; message or transport and how can i write my custom code to perform this authentication. i would be grateful if someone gives me a solution. I dont want to use transport security with http as I dont want to use SSL. what are the possible ways.
Thanks a lot in advance. Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Newbie Qn im new to WPF and i cant figure out how to databind WPF controls to a datasource. can anyone please give me a crash course on how to do this Also how can i use controls like the 'timer' and other controls that are not directly available in from the Visual Studio 2005 toolbox (but are available in a normal windows App) when working with a WPF application. Ive also got expression blend RC1. is this better to use as a starter than using the templates in Visual stuio. Thanks guys.
Matt Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
MouseBinding wheel rotation - both directions? I see what you're saying now. It doesn't appear that there is a separate MouseAction for wheel scroll up vs. down. Honestly, I'm not even sure if WheelClick does anything different than registering if the wheel is clicked or rotated. Maybe the WPF team can get that in for 3.5 Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Memory and GDI Release problem. Dear all:
When I new a Image to the application, the Memory and GDI of the application will increase. What can I do to release the Image and decrease the Memory and GDI
Sample Code:
BitmapImage bi = new BitmapImage(); bi.BeginInit(); bi.CacheOption = BitmapCacheOption.OnDemand; bi.CreateOptions = BitmapCreateOptions.DelayCreation; bi.DecodePixelHeight = 64; bi.DecodePixelWidth = 64; bi.UriSource = new Uri("D:\\PIC\\dog\\p0.jpg"); bi.EndInit(); BitmapSource BTS = bi;
Image img = new Image(); img.Width = 100; img.Height = 100; img.Source = BTS;
Best regard. Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Is there an equivalent of value in a WPF ComboBoxItem? could you please provide an example for this...
item = new ComboBoxItem(); item.Name = "item"+dr["CampaignId"].ToString(); item.Content = dr["CampaignTitle"].ToString(); item.Tag = dr["CampaignTitle"].ToString(); cmb1.Items.Add(item);
void cmb1_SelectionChanged(object sender, SelectionChangedEventArgs e) { dock1.Visibility = Visibility.Visible; string query = "select * from foo where id= "+cmb1.SelectedValue; } Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Hey! What WPF application are you doing now? I've been working on a Desktop sticky (post-it) notes application, mostly for my wife, but also to familiarize myself with WPF and desktop programming in general (i mostly do web applications). You can check it out here : StickySpaces Tag: Windows Communication Foundation (Indigo) Can a service operation return a dataset? Visual Studio 2008
Mark Shen
Hi there,
Just a quick question. How can I make a service operation return a dataset to the client