15,888,401 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Mark Salsbery (Top 200 by date)
Mark Salsbery
27-Nov-11 14:40pm
View
>>"and since my variable is typed short int"
Sorry about that. Regardless, you HAVE to use the data pointer and stride values returned by lockbits. You can't assume anything. The stride can even be negative. So use stride/2 (When using pointer arithmetic I prefer to use Byte* then cast to an Int16* in the inner loop, but that's just me). 16bppgrayscale is not supported anyway (or has very limited support) so you may still struggle with that!
Mark Salsbery
26-Nov-11 11:05am
View
and this
LinePtr = ptr + (i * height);
should be something like this
LinePtr = ptr + (i * stride);
Mark Salsbery
26-Nov-11 11:00am
View
If you already know this then why aren't you doing it? The exception is coming from a textbox so you know you have to use the dispatcher. You're always invoking a mehod, not "calling UI elements".
Mark Salsbery
25-Nov-11 18:52pm
View
Last time I checked, that pixel format isn't supported so to even get that far is lucky. Just always use the stride returned by the system :)
Mark Salsbery
24-Nov-11 13:36pm
View
Doesn't seem to be supported in XAML. See posts here for alternatives...
XAML - Setting value on nested property ?
[
^
]
Mark Salsbery
24-Nov-11 12:49pm
View
Sorry for some reason I was thinking Windows Phone 7 - I suppose because the topic was Silverlight.
Mark Salsbery
23-Nov-11 11:20am
View
There shouldn't be a conflict. The "Silverlight Enabled" web service is just a template pre-configured to not use anything Silverlight doesn't support. If any service SHOULD work it should be the Silverlight Enabled one.
Are you sure your endpoint configurations match on the client and server ends?
Mark Salsbery
23-Nov-11 11:14am
View
Does this work? NestedObject.NestedTestProperty="{Binding Value}"
Mark Salsbery
22-Nov-11 15:07pm
View
Is your code thread safe? After the foreach loop ends, there can still be items queued for dispatching on the UI thread...does anything happen at the end of the foreach loop that would make the queued data items be invalid or inaccessible?
Mark Salsbery
21-Nov-11 20:38pm
View
The problem is there's no indentation and some missing semicolons.
Mark Salsbery
21-Nov-11 14:41pm
View
Silverlight has a report viewer control?
Mark Salsbery
21-Nov-11 14:29pm
View
Is the assembly really named "WpfUserControls.resources"? How are you trying to do this? Using Application.LoadComponent?
Mark Salsbery
19-Nov-11 13:03pm
View
That was just one example, and the reference in step 5 is to the service library - code you already have. You just need to call the existing service (steps 10-11 at the link) from a page, right?
Mark Salsbery
18-Nov-11 11:13am
View
In WPF it's easier than ever to prevent this. You need to use appropriate elements that behave the way you need them to when positioning child elements and don't use hard-coded positions and dimensions.
Mark Salsbery
18-Nov-11 3:58am
View
Can you see the canvas when you run it? Why are width and Height set to "auto"? You do have the event handler methods in your class yes?
Mark Salsbery
18-Nov-11 3:55am
View
What's not working? Are you receiving your XML?
Mark Salsbery
17-Nov-11 11:15am
View
Does your client configuration match the service configuration? Anything in here that may help (if you haven't been through all these already)?
How to: Use basicHttpBinding with Windows Authentication and TransportCredentialOnly in WCF
[
^
]
Mark Salsbery
16-Nov-11 13:31pm
View
Oh cool! I'll change the code above. Glad you finally got it working!
Mark Salsbery
16-Nov-11 13:30pm
View
Did you try replacing the two e.GetPosition(null) calls with the code I noted above?
PointToScreen(e.GetPosition(this))
*edit* never mind - I see you did!
Mark Salsbery
16-Nov-11 12:31pm
View
Your code should work if you get the correct cursor coordinates (where you make the GetPosition() calls) - that's what I'm saying. I use similar code all the time for allowing the user to drag elements around.
Mark Salsbery
16-Nov-11 11:49am
View
You can't rely on GetPosition(this) to work. Yes, it may work when dragging slowly, but does it really work? You are positioning a window while getting coordinates of the cursor relative to the same window that is moving - that's likely to not work so well. You need to use GetPosition(parentofthis) so you are getting coordinates relative to the element you are positioning the window on. If the window is the topmost element then screen coordinates are what you'd want so you could probably do something like this
PointToScreen(e.GetPosition(this))
Mark Salsbery
16-Nov-11 11:27am
View
I don't know what the differences are but I'm sure there's many differences between IE and the browser control.
Netflix's media element may require something that's not available in the control...can you stream video to a regular MediaElement in your Silverlight app?
Mark Salsbery
16-Nov-11 11:21am
View
This has absolutely nothing to do with WPF. If you add more topic categories to your post you may get better response.
Mark Salsbery
16-Nov-11 11:09am
View
Yes DragMove blocks and consumes the mouseup event. Yes you are still calculating coordinates incorrectly as I stated repeatedly in your last thread on this topic :)
Mark Salsbery
14-Nov-11 16:28pm
View
"the event should be already be subscribed by the search.datagridMouseClick += new MouseButtonEventHandler(search_datagridMouseClick) at this point)"
"Should be"? You've confirmed with a breakpoint on the line that subscribes to the event (adds the handler)? If the event is null then it's not subscribed to, and it's good practice to always check before trying to raise the event.
Mark Salsbery
14-Nov-11 16:12pm
View
Sure it's something easy you're missing! :) Debug it.
Add null check before trying to raise the event as described in other posts.
Use a breakpoint to make sure this code is being called
search.datagridMouseClick += new MouseButtonEventHandler(search_datagridMouseClick);
Put breakpoint at the top of your dataGrid1_MouseDown handler. If you can't then you shouldn't have been able to compile the line of code above that adds the handler. Does the breakpoint get hit ever? If not then that's a problem. If so, is the event you're about to raise still null? If so, then you didn't add a handler to the right event object.
Mark Salsbery
14-Nov-11 13:04pm
View
Every time you subscribe to an event in the .NET framework your handler is in a "different project" than the event is in. How is yours different?
Mark Salsbery
14-Nov-11 10:48am
View
The project the code is in has nothing to do with it. If your DLL is loaded as part of a process then you can use the code just like any other. You can debug it, set breakpoints, etc. .NET framework code is in DLLs and events work just fine. You just can't expect an event to be raised and handled without first subscribing at least one event handler to the event.
Mark Salsbery
14-Nov-11 10:42am
View
WCF and database access have nothing at all to do with each other, nor did I imply they did.
Mark Salsbery
13-Nov-11 11:32am
View
Cool thanks. If setting the Background property alone isn't giving you the look you want then you still may need to re-template the control to get your desired look. See the default template at the link I posted above.
Mark Salsbery
13-Nov-11 10:56am
View
Show code! Do your buttons have a template that uses the Background property? The default button template may use a gradient or opaque version of the background color (see
Button Styles and Templates
[
^
]). Do you see your color when cursor moves over the buttons?
Mark Salsbery
11-Nov-11 11:10am
View
Also you don't HAVE to use WCF. You can use any communication provided by Silverlight. WCF definitely saves you some work though. RIA services can save you even more (http://msdn.microsoft.com/en-us/library/ee707344%28v=VS.91%29.aspx). The Silverlight Business Application project template is a good place to start...
Mark Salsbery
11-Nov-11 11:03am
View
The binding should be OneWayToSource but other than that you should be able to do a binding like any other.
Mark Salsbery
10-Nov-11 11:14am
View
What is the type of object owned by another thread - a UI element?
Mark Salsbery
9-Nov-11 15:12pm
View
I've never used FrameworkElementFactory because it's been deprecated for some time, but how can you set a concrete instance (object) of a BitmapImage to a template?
FWIW - "The recommended way to programmatically create a template is to load XAML from a string or a memory stream using the Load method of the XamlReader class."
Mark Salsbery
9-Nov-11 11:09am
View
All service endpoints on a running service are available no matter what.
On the client end either remove the endpoint configurations you don't want the client to have from the configuration file or handle the connections programmatically instead of through configuration.
Mark Salsbery
8-Nov-11 10:57am
View
Nothing weird with the window. Window is a contentcontrol so has one single content object. If you set Content to something else then you replace the original.
Mark Salsbery
7-Nov-11 15:42pm
View
The client should only need credentials if your configuration requires client-side credentials, no?
Mark Salsbery
7-Nov-11 15:40pm
View
Both solutions are correct - the code at the link leaves out all the control parts in the "..." section. Just wanted to mention, if you have Blend you can easily get a copy of the template and manually adjust all the border radii as desired.
Mark Salsbery
7-Nov-11 15:33pm
View
Your rotatetransform shouldn't effect size in any way as it's just used as a render transform. Are you sure your widths and heights are all being calculated correctly? Also, do you really need to create a transform and group on every ROTATE_CLOCKWISE call? Can't you set that in the element once and use the same transform every time? :)
Mark Salsbery
7-Nov-11 15:26pm
View
Can you just include what you need in the client side configuration?
Mark Salsbery
4-Nov-11 15:44pm
View
I'm not sure how many ways I can repeat this. :) If you're moving the same window you're getting the coordinates relative to, then yes the window is probably not going to stay with the cursor.
Mark Salsbery
4-Nov-11 14:44pm
View
Additionally, I know nothing about the ASP.net account, but is it for all ASP.NET apps? I'd prefer finer grained permissions than that when multiple apps are on same server, but that's just me.
Mark Salsbery
4-Nov-11 14:40pm
View
Possibly either, but on IIS 7+ I personally use the app pool identity on my client's sites (and had to - file access from server will fail if I don't give permissions) and have never used any "ASP.net" account so I don't know.
Mark Salsbery
4-Nov-11 11:45am
View
What is Body3D? Isn't that the same object as "this" in your code? The coordinates can't be relative to the object you are moving. They have to be relative to the same coordinates that this.Top and this.Left are relative to!
Mark Salsbery
4-Nov-11 10:58am
View
What are "Normal methods"?
Mark Salsbery
3-Nov-11 13:51pm
View
Is your service application running under a user account that allows network access?
Mark Salsbery
3-Nov-11 11:18am
View
Performance shouldn't be an issue. The entire Windows and WPF system uses Direct3D on the Windows Display Driver model these days.
You can do the usual drag code - on mousebuttondown set a InDrag flag and save the coordinates. On mousemove if InDrag is true get the current cursor coordinates and adjust the window position using the delta from the previously saved coordinates. Save the new current coordinates. On mouseup set InDrag to false.
Mark Salsbery
2-Nov-11 12:44pm
View
Do you really have a cross domain issue? If the Silverlight app is hosted on the same domain as the web service (for example https://skydrive.live.com) then you don't have a cross domain issue and the problem is probably just an incorrect service URI (for example, client is still trying to use a "localhost" URL).
Mark Salsbery
29-Oct-11 12:00pm
View
The only thing I see weird is p1numlist and p2numlist being IList objects instead of List<int> objects so you don't need to cast to int everywhere, but that wouldn't break anything...
Mark Salsbery
28-Oct-11 9:24am
View
Accessing Web Services in Silverlight
[
^
]
Mark Salsbery
26-Oct-11 11:02am
View
Agreed. That would be my solution. You shouldn't be halting the UI thread on WP7 (or Silverlight or WPF)...
Mark Salsbery
25-Oct-11 19:28pm
View
You stated "like List<string>", not ObservableCollection<People>. Is your People class WCF-serializable? Does it work if you use List<People>?
Mark Salsbery
25-Oct-11 11:12am
View
What do you mean "the service cannot call back the CLient"?
Mark Salsbery
25-Oct-11 11:00am
View
No. The user closes browser windows/tabs. You could control the plugin object's lifetime from your html if you want to.
Mark Salsbery
25-Oct-11 10:58am
View
Just setting the properties of a ServiceReference1.newpdfRequestBody object invokes it? Unlikely. You should have a different proxy class that has a newpdf() method that can be called...
Mark Salsbery
19-Oct-11 11:05am
View
Yes the OpenFileDialog needs to be user initiated as mentioned by me and in the docs ("For security purposes Silverlight file and print dialogs must be user-initiated. In addition, there is a limit on the time allowed between when the user initiates the dialog and when the dialog is shown. If the time limit between these actions is exceeded, an exception will occur."). User initiated would be in response to a button Click event for example.
Mark Salsbery
17-Oct-11 20:00pm
View
Unless you're using something like AJAX, ASP.NET code and WCF service code both run on the server side. What kind of client side technology are you using?
Mark Salsbery
26-Jul-11 17:28pm
View
By default, RowDetailsVisibilityMode is VisibleWhenSelected. So you can unselect a row by ctrl-click. What are you doing in your mousedown handler? You'd need to find the row and set its DetailsVisibility to Collapsed I believe.
Mark Salsbery
26-Jul-11 15:23pm
View
What password where???
*edit* oops sorry, the existing comments didn't show up until I posted this comment...
Mark Salsbery
26-Jul-11 15:18pm
View
Is the setter even being called? Put a breakpoint in there...is IsDirty getting set?
Mark Salsbery
26-Jul-11 15:12pm
View
What type of client application? Silverlight?
Mark Salsbery
25-Jul-11 23:48pm
View
In C++/CLI! :)
Mark Salsbery
25-Jul-11 23:48pm
View
I highly recommend learning WPF. Your question falls under the basics of WPF, so you'll probably want to learn that...
Windows Presentation Foundation
[
^
]
Mark Salsbery
23-Jul-11 19:08pm
View
A couple comments...
>>If the call to Control.Invoke or Control.BeginInvoke is done in UI thread, the delegate will be called immediately. As the invocation mechanism is redundant in this case
Not true for BeginInvoke(). The delegate is still queued, which can be useful to queue a work item on the same thread but after any current queued items have completed.
>>The Dispatcher really works for non-UI applications as well, but is Invoke or BeginInvoke is used, it does not do anything useful if there is no active UI thread!
Sure about that? The work item should be queued on the thread that created the dispatcher...
Mark Salsbery
23-Jul-11 18:53pm
View
Something like this?
Textblock1.Dispatcher.BeginInvoke(new Action(() =>
{
Textblock1.Text = DateTime.Now.ToShortTimeString();
}));
Mark Salsbery
23-Jul-11 12:24pm
View
I know. That's why I suggested add a collection of filenames instead of a single file name. Send all the files on your one stream. You'd need to pass the file lengths in a collection as well so you can parse the files from the stream on the receiving end (all this still using MessageContract). I was trying to give a suggestion that you could use wih your existing code shown with minimal changes :)
Mark Salsbery
23-Jul-11 0:56am
View
I rarely post code I don't test first....this was no exception. Works fine.
Mark Salsbery
22-Jul-11 21:37pm
View
Why do you use MessageContract? You already have the stream...maybe come up with a scheme to send multiple files on that stream. You could add messageheader item(s) to the contract with collections of file names and lengths perhaps?
Mark Salsbery
22-Jul-11 16:33pm
View
You must be tying up the UI thread, so even starting the animation manually may not help. Lengthy operations should be done on a separate thread!
Mark Salsbery
22-Jul-11 1:48am
View
If you Bing/Google search on "DocumentViewer FlowDocument" you'll find many questions asked about that. Apparently at one time DocumentViewer could be used for flowdocuments but in one framework version that went away by design. DocumentViewer may still work partially, but it's now documented for fixed document content.
Mark Salsbery
21-Jul-11 23:37pm
View
DocumentViewer is the documented wrong element for flowdocuments but if you like it use it.
As for the print option, the docs state "The default toolbar UI does not include a Print button". IsPrintEnabled enables the routed command, that's it.
Mark Salsbery
21-Jul-11 21:43pm
View
FlowDocumentReader?
Mark Salsbery
21-Jul-11 18:35pm
View
The order of elements in the Children collection of a Panel element also determines the Z-order, so instead of using Panel.ZIndex, simply placing the desired topmost element after other elements will work.
Mark Salsbery
21-Jul-11 14:59pm
View
You're welcome for the code snippet... :)
Mark Salsbery
21-Jul-11 14:57pm
View
Is the Silverlight application hosted in the same domain (http://localhost:49271) as the service?
Mark Salsbery
21-Jul-11 14:54pm
View
If you don't see the option then Visual Studio thinks the project isn't compatible with adding a WCF reference (for example, a C++/MFC project). Your "simple website application" needs to be an ASP.NET project. You can build the reference manually using the
Svcutil.exe
[
^
] utility if you need to.
Mark Salsbery
21-Jul-11 4:39am
View
How are you trying to add a service reference? And to what kind of project. You should be able to choose "Add service reference..." in Visual Studio from the project menu or by right-clicking the project in Solution Explorer.
Mark Salsbery
20-Jul-11 18:52pm
View
Did you ask on the Infragistics forum?
Mark Salsbery
20-Jul-11 18:50pm
View
I'm missing something....IDispatch and DispatchWrapper are for interop...you need dispatchers for invoking code on the UI thread which are threading dispatchers. Why can't you use the WPF element's dispatcher directly?
Mark Salsbery
20-Jul-11 17:23pm
View
And, since button.Content isn't a string, you may want to change
if (button.Content == " 3 ")
to
if (button.Content.ToString() == " 3 ")
Mark Salsbery
20-Jul-11 16:46pm
View
Good link! I do, however, disagree that Silverlight is a "thin client", but that's just my opinion :)
Mark Salsbery
20-Jul-11 16:38pm
View
Or just add a service method which you call whenever a checkbox value changes?
Not sure what you are getting at here. If the client has the checkbox then the above statement could work. If it's the service host app that has the checkbox and you need to notify clients then you need a duplex service binding or the clients would have to poll.
Mark Salsbery
20-Jul-11 16:33pm
View
*never mind* see below
Mark Salsbery
20-Jul-11 16:24pm
View
What is "IDispatcher"? I can't seem to find that interface in documentation.
Mark Salsbery
19-Jul-11 21:44pm
View
The Silverlight toolkits are supported, active, and you need them if you want to use any of the controls offered there since the controls there are not yet in the actual released runtime.
As for your null reference...where does this occur in the code?
Mark Salsbery
19-Jul-11 18:58pm
View
Shouldn't the binding path be Text.Caption and not just Caption?
Mark Salsbery
17-Jul-11 17:58pm
View
Your "problem" is just basic client/server applications. WCF can make this real simple - Visual Studio and WCF will do most of the work. Use one of the duplex bindings to get your ticker functionality.
Mark Salsbery
15-Jul-11 20:58pm
View
I just searched for it. I have no connection to the link or the content within :)
Mark Salsbery
15-Jul-11 14:35pm
View
I don't know anything about Kinect cameras, but have you seen this?
Silverlight + Kinect = Apps of tomorrow
[
^
]
Mark Salsbery
15-Jul-11 14:27pm
View
Added code sample to solution above...hope it helps!
Mark Salsbery
15-Jul-11 14:13pm
View
Please don't post questions/replies as solutions. There's comment and reply links here for that :)
I gave you a big hint....track the loggedin/loggedout state in a single object. Any place you need to set something based on this state you just bind to or subscribe to events on that single object. Then none of your control classes need to have intimate knowledge of any other class (for example, main page doesn't need to know of the existence of some usercontrol with a button in it whose text needs to be changed).
Mark Salsbery
15-Jul-11 13:44pm
View
Thanks Abhinav!
Mark Salsbery
15-Jul-11 11:50am
View
Nothing about MyUserControl is "fixed". It's my class, I wrote it. It can be changed any way necessary.
This is just a functioning example - you need to change the class(es) to your needs.
Again, wrap your user control in a class derived from UserControl like the MyUserControl class example. That class can store any information it needs to clone itself - the image pathname for example.
Mark Salsbery
14-Jul-11 18:46pm
View
You need to choose some sort of transport. Assuming internet communication, that will be TCP/IP or a protocol on top of TCP/IP like HTTP. Client-to-client (or peer-to-peer which is probably what you mean) means one or all peers need to be able to listen for connections, effectively making every "client" a "server" as well. That brings in administration issues - many computers aren't set up to allow incoming connections by default, and many network admins won't allow it. Do you really want your users to have to configure firewalls and port forwarding? This needs to be taken into consideration.
Since most machines are configured to allow outbound connections (like accessing the web)I personally use a server (usually using HTTP protocol), which acts as a relay server. Clients don't directly connect peer to peer, but instead only connect to the server. The server relays messages (or media streams) on to the recipient peer(s). This way the only administration issues are on the server.
Mark Salsbery
14-Jul-11 18:17pm
View
A service method gets called on the server whenever a client calls it, and you're the one that writes the service methods, so you have the code right there to do anything you want to when the client makes a call.
Mark Salsbery
14-Jul-11 16:23pm
View
If you look at the sample code and understand it, then you should be able to modify it to your needs. It's fairly simple: When a drag/drop is initiated, an arbitrary data object is created and passed to the drop handler. On drop, the data object is extracted and used for whatever purpose needed.
Passing image information to the drop target is getting a little too specific for my taste - meaning I don't like that the drop element needs to know so much about the element classes being dropped. I think I'd modify it so the dragable element makes a clone of itself when a drag/drop is initiated, and passes that clone object to the drop handler. Then the drop target only needs to add that passed object to its visual tree.
For example, change the MyUserCOntrol drag handler to make a clone of itself and pass it to the drop target...
public class MyUserControl : UserControl
{
public MyUserControl()
{
this.Height = 125;
this.Width = 100;
Button b1 = new Button();
b1.Height = 25;
b1.Width = 75;
b1.Content = "Dynamic button";
Label lb1 = new Label();
lb1.Height = 25;
lb1.Width = 85;
lb1.Content = "Dynamic UserControl";
StackPanel sp = new StackPanel();
sp.Children.Add(b1); sp.Children.Add(lb1);
this.Content = sp;
this.MouseMove += new MouseEventHandler(MyUserControl_MouseMove);
}
void MyUserControl_MouseMove(object sender, MouseEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed)
{
// Make a clone of ourself - we'll pass it to the drop target
MyUserControl cloned_uc = new MyUserControl();
DragDrop.DoDragDrop(this, new DropableCanvasDragDropData(this.Parent as Panel, cloned_uc, e.GetPosition(this)), DragDropEffects.Copy);
}
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////
Then in the DropableCanvas drop handler, just use the passed uesercontrol...
void DropableCanvas_Drop(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(typeof(DropableCanvasDragDropData)))
{
DropableCanvasDragDropData dragdropdata = e.Data.GetData(typeof(DropableCanvasDragDropData)) as DropableCanvasDragDropData;
if (dragdropdata.UserControl != null)
{
// Position the usercontrol on this canvas at the drop point
Point dropPoint = e.GetPosition(this);
Canvas.SetLeft(dragdropdata.UserControl, dropPoint.X - dragdropdata.OffsetPoint.X);
Canvas.SetTop(dragdropdata.UserControl, dropPoint.Y - dragdropdata.OffsetPoint.Y);
// Add the usercontrol to this canvas
this.Children.Add(dragdropdata.UserControl);
}
}
e.Handled = true;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////
I'll let you figure out how you want to clone your usercontrol. I'm not sure if two image elements can share the same source, but if not, you'll need to load the image data again for the cloned object, which means the MyUserControl class would need to know the pathname of the file.
Mark Salsbery
13-Jul-11 18:17pm
View
Yes when you navigate away from the page hosting the SIlverlight plugin, the plugin goes away and gets recreated when you return to the page.
You may want to change your question tags and add asp.net or web development since this issue is more related to those than Silverlight.
Mark Salsbery
13-Jul-11 18:14pm
View
Yes, seeing your XAML would be helpful! This seems to work fine for me...
<Border Background="Orange" BorderBrush="Black" BorderThickness="1" CornerRadius="11" Width="100" Height="100" />
Mark Salsbery
13-Jul-11 18:08pm
View
There's no client to client communication in Silverlight duplex service. It's all between a client and the server. The client can call the server any time using any of the client-accessible service methods.
The only problem I see is doing a popup on the server. That's only going to work if you host the service(s) in a process that has a UI. Won't work hosted in IIS process or a Windows Service process, unless you have another app running that communicates with the host process using some IPC method.
Mark Salsbery
13-Jul-11 18:04pm
View
Why can't you add controls? Why would a "child page" class ever be derived from a "parent page" class? You've provided no information about what problems you are having...
Mark Salsbery
13-Jul-11 17:07pm
View
My fault. I see you create the usercontrol in code, so the drop handler has no idea about the child elements in the usercontrol - it just creates an empty usercontrol. You'll need to create a usercontrol and add the child elements just like you did to create the original. I would derive a class from UserControl which adds all the child elements and sets the properties in code. Create an instance of this derived class instead of an instance of UserControl. Then the drop handler should work as shown.
For example, this works...
public class MyUserControl : UserControl
{
public MyUserControl()
{
this.Height = 125;
this.Width = 100;
Button b1 = new Button();
b1.Height = 25;
b1.Width = 75;
b1.Content = "Dynamic button";
Label lb1 = new Label();
lb1.Height = 25;
lb1.Width = 85;
lb1.Content = "Dynamic UserControl";
StackPanel sp = new StackPanel();
sp.Children.Add(b1); sp.Children.Add(lb1);
this.Content = sp;
this.MouseMove += new MouseEventHandler(MyUserControl_MouseMove);
}
void MyUserControl_MouseMove(object sender, MouseEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed)
{
DragDrop.DoDragDrop(this, new DropableCanvasDragDropData(this.Parent as Panel, this, e.GetPosition(this)), DragDropEffects.Copy);
}
}
}
...
MyUserControl uc = new MyUserControl();
uniformgrid1.Children.Add(uc);
Mark Salsbery
12-Jul-11 19:19pm
View
Since you state you are able to get the serialized data to the client, then what is failing during deserialization?
Mark Salsbery
12-Jul-11 18:13pm
View
In the time you've impatiently waited for a reply you could have studied the DirectSound documentation to learn how to enumerate and choose devices and work with audio buffers... :)
Mark Salsbery
12-Jul-11 16:50pm
View
Then it should be throwing an exception....what's the exception??
Mark Salsbery
11-Jul-11 15:30pm
View
Why isn't it happening? Does the drag ever get initiated? Does the drop event handler get called?
Mark Salsbery
10-Jul-11 19:34pm
View
They can be added with the Project/Add new item... option in Visual Studio. Not sure what went wrong with yours....check the tool-generated code and make sure it's using the namespace(s) you think it is.
Mark Salsbery
10-Jul-11 13:05pm
View
You should be able to debug why the drop is failing. Put a breakpoint in the drop event handler and step through. Make sure you set all the same properties in code that get set in the XAML version of your usercontrol.
Mark Salsbery
8-Jul-11 13:11pm
View
The built-in drag and drop functionality I used above is pretty generic. WPF doesn't care what's being dragged and dropped (unless you're using built-in dropdata types) so you're free to use what you want. If you take the above sample and understand how it works, then you can easily pass a collection of selected media objects in the DropableCanvasDragDropData class. THe drop target can do whatever with these - create mediaelements, put them in a listbox, etc...
Also see the link SA provided...
Drag and Drop Overview
[
^
]
Mark Salsbery
8-Jul-11 13:04pm
View
You need to research alternatives and choose what's best for you :). I personally am able to host on Windows server platform and use IIS so I really like (and use) WCF. Makes for rapid development, is flexible with hosting options, and flexible in configuration. WCF RIA Services (for Silverlight apps) is nice too. I also use IHttpHandler implementations when I need a simple service that I have full control over. There's also ASP.NET web services.
Mark Salsbery
8-Jul-11 12:34pm
View
This doesn't look like a sync/async issue at all. It looks like you are trying to execute code on the client which should be done on the server end.
Mark Salsbery
8-Jul-11 12:31pm
View
This is an ASP.NET/web development question, not a Silverlight question. If you modify your question tags appropriately you may get better responses.
You don't load XAML pages in your web pages. You use the Silverlight plugin on your web pages. How you navigate web pages is a web development issue.
Mark Salsbery
8-Jul-11 12:11pm
View
This is an ASP.NET/web development question, not a Silverlight question. If you modify your question tags appropriately you may get better responses.
You don't load XAML pages in your web pages. You use the Silverlight plugin on your web pages. How you navigate web pages is a web development issue.
Mark Salsbery
6-Jul-11 17:14pm
View
Actually the information is there in the example solution to create a new usercontrol easily. I've appended a modified version of the one method that needs to be changed to this solution - the drop event handler on the dropable canvas.
Mark Salsbery
6-Jul-11 17:03pm
View
Yes, one control can't exist as the child of more than one element, so you'll need to provide a way to create a new usercontrol object on the drop target. How you do that is up to you depending on your implementation. You can add necessary info to the DropableCanvasDragDropData class if needed. For example, you could pass the usercontrol's type, and on drop, use Activator.CreateInstance() to create a new object of that type.
Mark Salsbery
5-Jul-11 21:09pm
View
Yes, there is alot of caching going on. For example, Windows caches file I/O, hard drives may (and most often do) have a cache, etc.
To disable buffering in Windows you'd probably need to bypass it by PInvoking CreateFile and using the FILE_FLAG_NO_BUFFERING flag (I don't think unbuffered file I/O is available in .NET unless I missed a memo).
Some reading...
CreateFile Function
[
^
]
File Caching
[
^
]
File Buffering
[
^
]
How to empty/flush Windows READ disk cache in C#? (sample code)
[
^
]
Mark Salsbery
5-Jul-11 14:13pm
View
Works fine for me. You have to actually put the control on a canvas....I have appended that sample usage code in my solution above...
Mark Salsbery
5-Jul-11 14:12pm
View
Yes, the data has to be there for the datacontext to be non-null :) Glad you got it working!
Mark Salsbery
4-Jul-11 15:51pm
View
What's the question? What's not working?
Mark Salsbery
2-Jul-11 13:48pm
View
You haven't specified what type of projects they are....executables I assume? Or libraries? If executables then one process would need to start the other process.
Mark Salsbery
2-Jul-11 12:38pm
View
"Convert.ToDouble(0)"?? :) I'm just curious....are you running in the debugger? Is the performance the same running the app stand-alone?
Mark Salsbery
2-Jul-11 12:34pm
View
Yeah! Bing "wpf datagrid CRUD" for thouseands of examples :)
Mark Salsbery
1-Jul-11 13:47pm
View
If you use Silverlight navigation (
Frame
[
^
] and
Page
[
^
]) then refresh should bring you back to the last Page. Just tested it on a simple navigation app.
Mark Salsbery
1-Jul-11 12:41pm
View
You can use any other UIElement derived class object besides Window. Depends on what you want there.
Mark Salsbery
1-Jul-11 12:34pm
View
What kind of COM object and how is the issue related to WPF?
Mark Salsbery
29-Jun-11 17:29pm
View
You can reference your properties in your usercontrol class but you need to set the data context so the framework knows what object to look at to find those properties. I don't know VB, but you need to set the DataContext of your usercontrol object to a reference to itself.
Also, your PropertyPath strings should simply be "X", "Y", and "Angle", provided those are the property names in the UC1 class (you haven't shown the properties you are trying to bind to).
I'm not sure what you are trying to do here. Your SetTargetProperty() calls on the storyboard look way wrong. You shouldn't be trying to animate the DoubleAnimationUsingKeyFrames objects, you should be animating some properties that actually change the position and angle of whatever element you are animating.
You said it worked when you animated the Canvas.Left/Canvas.Right properties. Instead of that method (which gives you no rotation), you can set the RenderTransform property of your custom control to a TransformGroup containing a TranslateTransform and a RotateTransform. Then you can animate the X and Y properties of the TranslateTransform for position, and the Angle property of the RotateTransform for rotation. See the example code here:
DoubleAnimationUsingKeyFrames Class
[
^
]
Mark Salsbery
29-Jun-11 17:19pm
View
.NET will gleefully keep allocating memory if it's available until it decides to free some up. Like others have asked, how do you know it's a leak?
Mark Salsbery
28-Jun-11 19:24pm
View
...or, since you're already using LINQ to "for give data from entity from table JobType", shape the data into a hierarchical class as shown by Pete instead of shaping it into flat records.
Mark Salsbery
28-Jun-11 17:59pm
View
Cross domain issue and project layout are not related in any way.
A silverlight app hosted at the domain http://domain1 cannot access a service in http://domain2 unless domain2 has a cross domain policy in place - effectively giving permission to access its domain from another domain.
How you organize your projects and solutions is up to you. If you don't know how to work with projects and solutions in Visual Studio then create a new Silverlight application using the supplied project templates and use the two created projects (server and client) as a guide.
Mark Salsbery
28-Jun-11 16:33pm
View
*edit* Never mind. Downloaded your code...see possible solution below...
Mark Salsbery
28-Jun-11 15:32pm
View
What do you mean by "Binde This silverlight projet to My ASP project"? Silverlight apps can be delivered on any HTML page. Create a fresh new silverlight project in Visual Studio. It will create the Silverlight client project and a server web project. In the web project you'll see both an HTML page and a ASPX page, both of which show how to embed a Silverlight app in a web page.
If you meant binding at the solution/project level, then go to the properties for your web app project, click on the Silverlight applications tab, and click the "Add..." button. Add the appropriate Silverlight project(s).
Mark Salsbery
28-Jun-11 15:24pm
View
TabData is what I used in my example. You need to use the type you are using to supply data to the tabitems.
Mark Salsbery
27-Jun-11 20:28pm
View
Does this work (add to end of server service handler method) or is it the same thing the sample linked to above does?
WebOperationContext.Current.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.OK;
WebOperationContext.Current.OutgoingResponse.StatusDescription = "Ok";
Mark Salsbery
27-Jun-11 20:08pm
View
Animate a RotateTransform object on your user control? Something like this maybe?
Silverlight RotateTransform Animation Example
[
^
]
Mark Salsbery
27-Jun-11 16:14pm
View
I was referring to this line:
elps.RenderTransform = transformEllipse;
WHat is transformEllips? You don't show that, but if it's only one object then every ellipse you set elps.RenderTransform = transformEllipse to is sharing the same transform so when you animate the transform it applies to all. If this is the case, you need to create a unique transform instance for each ellipse.
Mark Salsbery
26-Jun-11 19:32pm
View
Like I mentioned earlier - try accessing the service address from a browser. Does that work? If not, then the service is not configured properly. If it works, then either the client isn't connecting to the correct endpoint address or you have a cross-domain issue.
Mark Salsbery
26-Jun-11 18:55pm
View
The easiest way is to add a Silverlight-enabled WCF service to the server application project, then add a service reference to that service in the Silverlight project. The service reference will create a proxy class you can use to make service calls from the Silverlight application.
If the Silverlight application will be hosted on a different domain than the server application hosting the WCF service, then you'll need to worry about cross domain policy, so you'll need to provide a cross domain policy file as described at the link.
Mark Salsbery
26-Jun-11 18:44pm
View
WCF is well documented
[
^
]. You said you had a service working already, yes? It just didn't work across domain boundary, correct? See comment and link below...
Mark Salsbery
26-Jun-11 18:13pm
View
Ok I downloaded and looked at the GalleryWall projects....I thought it was already using WCF but it isn't, so nothing to copy over to your new project.
So as you stated: "when I use wbeservice\WCF outside from the Silverlight WebHost project as the webreference i'm getting this error"...Yes, when you try to make service calls outside of the Silverlight app's domain you will get that error. To fix it, you need to either host the service in the same domain as the silverlight app, or provide a cross domain policy:
Making a Service Available Across Domain Boundaries
[
^
]
Mark Salsbery
26-Jun-11 17:55pm
View
Deleted
You still need to configure at least one endpoint for the service or no client can connect. You can have multiple services each with multiple endpoints in your application (and configurations for those in the app/web.config).
Mark Salsbery
26-Jun-11 17:11pm
View
Please use the "Reply" link here when replying to comments, otherwise the person you are replying to doesn't get notified! :) If applicaple, did you move the WCF configuration over (all the WCF stuff in web.config)? Also if any namespace and/or class names changed in the move then you may need to change those in the configuration. Test your service by hitting the service URL from a browser....if you see the WCF service page then at least it's up and working.
Mark Salsbery
26-Jun-11 12:39pm
View
The solution to what? The OP didn't ask you to write the code or mention any problem with how the animations need to be. The problem is clearly marked in bold: "I click on next ellipse both (the previous ellipse and current ellipse) are getting animated.". Most likely because the same transform is being used for every ellipse, but the code creating the transform is not shown.
Mark Salsbery
26-Jun-11 12:31pm
View
Did you move the WCF service server-side code into your web project or are you you leaving it where it was? If the latter, then you'll need to have a cross-domain policy in place for it to work.
Mark Salsbery
25-Jun-11 19:54pm
View
Handle the MediaFailed event on the MediaElement and look at the exception. On the WPF MediaElement I can play all the Quicktime sample formats at the following link except for the "Sorenson Video" one...
QuickTime: Sample files
[
^
]
Mark Salsbery
25-Jun-11 11:26am
View
What is the source of the delay? How are you doing the update - through a binding?
Mark Salsbery
25-Jun-11 10:59am
View
What type of file is it? Did you call MediaElement.Play()? Is that file name correct? Is the path correct? Why the leading "/"?
Mark Salsbery
25-Jun-11 5:03am
View
If there's a decimal property in the row data objects, then you can bind the same as always, like <wpftk:DataGridTextColumn Header="Decimal" Binding="{Binding Path=SomeDecimalProperty}" />
What did you try that didn't work the way you intended?
Mark Salsbery
25-Jun-11 2:48am
View
Add a media file to your project. Highlight it, press F4 key to get properties, set Build Action to Content and set Copy to Output Directory to Copy Always or Copy if Newer. If you add a folder to project, for example called "Media", and place the media file in that folder, then the source URI for your MediaElement will be something like "Media/mediafilename.ext".
Mark Salsbery
25-Jun-11 2:26am
View
You can't play video from a resource. You can play a file attached to a project as content.
Mark Salsbery
25-Jun-11 0:02am
View
You can't bind to a class. Bindings need a runtime object (instance) of a class. You can bind to an instance of your class by setting the appropriate DataContext to the instance and not specifying a path in the binding (e.g. {Binding}). That will bind to the entire object, not a specific property.
Mark Salsbery
24-Jun-11 23:46pm
View
If you need the index you can find the TabData instance (((sender as MenuItem).DataContext) as TabData) in the TabControl's ItemsSource collection. For example, in my code I could use tabDataTestList .IndexOf(((sender as MenuItem).DataContext) as TabData); to find the tab index. If you run that code you'll see it knows which TabItem is clicked on because it removes the tab. You can't rely on the content of the TabItem, however, because WPF will delete it and re-create it as tabs are selected.
Mark Salsbery
24-Jun-11 19:32pm
View
You bind to properties of a class, not to a class. If you expect changes to properties in your class to notify a binding that the property has changed then the class needs to implement INotifyPropertyChanged and make sure the PropertyChanged event is raised for the property when a change is made. That's it. Can you post a small example of the class with a property and a binding to that property that is failing?
Mark Salsbery
24-Jun-11 18:51pm
View
Is it a c# property in a class implementing INotifyPropertyChanged or a dependency property? You mention the property not getting updated through a binding...is that binding OneWay mode when it needs to be TwoWay?
Mark Salsbery
24-Jun-11 17:35pm
View
Any way you would usually display a wchar_t string should work, but how you do that is going to vary depending on what you are using for UI (console, Win32, Windows Forms, WPF, etc.). SInce you mention WM_PAINT, I'm assuming Win32, so you could use the GDI TextOut() or DrawText(Ex)() functions, use an Edit control, etc. I guess the answer to your question is "yes" :)
Mark Salsbery
24-Jun-11 12:21pm
View
"Declared"? Defined? Instantiated? Show the code or an example!
Mark Salsbery
24-Jun-11 12:04pm
View
What web server platform? IIS? Is the web server set up for ASP.NET? Fort example, on IIS you may need to run the
ASP.NET IIS Registration Tool (Aspnet_regiis.exe)
[
^
].
Mark Salsbery
23-Jun-11 16:55pm
View
As we all know? SelectTemplate is called when a DataTemplate is needed. SelectTemplate has nothing to do with a click event, unless that click event is expanding a tree node and the system needs to select templates for the newly visible node(s). If you want to change templates when an event occurs then you'll need to implement that yourself.
Mark Salsbery
22-Jun-11 14:54pm
View
Silverlight 4 added UDP Multicast support, but not full UDP socket support. I don't think Silverlight can use WCF UDP bindings. You may want to check if Silverlight actually has the UDP capabilities you need...
Mark Salsbery
21-Jun-11 16:53pm
View
You may want to find out for sure :) If you can use managed c++ then converting from C# will be much easier. As for the List class, there are plenty of similar collection classes available for native C++. I certainly wouldn't mix in managed code just for that.
Mark Salsbery
21-Jun-11 16:32pm
View
Are you sure the client understands it's MANAGED C++? Totally different language than C++. Maybe the client expects unmanaged C++?
Mark Salsbery
21-Jun-11 16:26pm
View
You get limited support for many things in managed C++, and they won't be there in the future. Interesting that you're required to convert from C# where there's great support for intellisense, class diagrams, refactoring, etc. etc...
Mark Salsbery
21-Jun-11 16:14pm
View
I don't know of any, but it should be a relatively easy direction to go since there's probably no unmanaged code involved. Most code can be copied then the syntax changes applied. All code can pretty much go right in the header files in the class declarations...see the CLR Windows Forms application project template for an example of how to lay out your project file structure - the only code in CPP file is the main() function.
Mark Salsbery
21-Jun-11 15:56pm
View
You state "Shift does not exist in Manage namespace." but nowhere do you use "Shift" in that code. C# and C++ are case-sensitive and require names to be exact, not just close. ;) So what aren't you showing us?
Mark Salsbery
21-Jun-11 15:25pm
View
Please use comments under the previous solution to post these comments instead of posting the comment as a solution! :)
Mark Salsbery
21-Jun-11 15:23pm
View
You'll need to do similar for any datagrid implementation you use. Why would you need to create dependency properties for every column? Isn't that data already there in your array?
Mark Salsbery
21-Jun-11 15:07pm
View
For what it's worth, generics support in XAML is coming someday...
Generics in XAML
[
^
]
Mark Salsbery
21-Jun-11 15:06pm
View
Deleted
For what it's worth, generics support in XAML is coming someday...
Generics in XAML
[
^
]
Mark Salsbery
21-Jun-11 14:58pm
View
Handle it at the next level up - the parent page. There's no reason the two user controls need to know about each other.
Mark Salsbery
20-Jun-11 18:58pm
View
No help in
the documentation
[
^
]??
Mark Salsbery
20-Jun-11 18:26pm
View
Why the no-Window restriction? Specs? Or something you find restrictive? I assume the popup should behave modally, so do a Bing search on "WPF modal" and you'll find several examples - good and bad - that will at least point you in the right direction.
Mark Salsbery
17-Jun-11 19:56pm
View
What format is the image data? If you write the contents of p.FileBlob to a file, can you load the image from that file in other image viewing software like Paint?
Mark Salsbery
17-Jun-11 19:41pm
View
Is the sending code sending junk data or is the receiving code turning the data to junk data? And what is junk data? All we can really do is guess...
Mark Salsbery
9-Jun-11 18:52pm
View
Are you sure your "random" number is unique every time? I would call srand((unsigned)time(NULL)); before using rand()...
Mark Salsbery
9-Jun-11 1:41am
View
What do you mean "Mine is a web application"? What does that have to do with having or not having code-behind? You do know that XAML produces code too, right? :)
Anyway, the same binding rules apply. You need an instance of the class containing the field or property you want to bind to. You can create that instance in code and perhaps use the DataContext property somewhere to make the instance visible to the XAML, or you can create a static instance in the XAML.
Mark Salsbery
6-Jun-11 13:09pm
View
That pretty much IS the accepted solution. To keep the UI responsive you should do lengthy operations on separate threads. I don't see anything in the Expander class you can use to get a more definitive notification of the expander being collapsed.
Mark Salsbery
4-Jun-11 21:59pm
View
The web.config code is there. Just click on the "Browse Code" tab. ASP.NET code runs on the server, Silverlight code runs on the client, so you'll need some kind of way to request session info from the server, and WCF is an easy way to do it. Step 2 is add the WCF service, right? Just right click your project (or use the project menu), choose "Add new item...", find "WCF Service" in the "Web" section, name it "SessionService.svc" to match the article, and click the "Add" button.
Mark Salsbery
4-Jun-11 14:05pm
View
What are you asking? What "grid's content"? What "textboxes"? That XAML doesn't show anything relevant.
Mark Salsbery
3-Jun-11 23:26pm
View
What is the problem? You may need a "e.Cancel = true;" in there somewhere...
Mark Salsbery
31-May-11 15:10pm
View
I don't know VB but it looks right :) Have you put a breakpoint in the server operation code to see if the call is getting there?
Mark Salsbery
31-May-11 13:51pm
View
What do you mean "will not call the next service"? Is there an exception thrown?
Mark Salsbery
30-May-11 12:21pm
View
If the file is at a known URL, can't you just use something simple like a HttpWebRequest?
WCF involves a contract between endpoints. With WCF, your server end would need to read the file from the URL and stream it to clients. But if the URL is directly accessible from clients then a HttpWebRequest is much simpler...
Mark Salsbery
28-May-11 12:30pm
View
Can you bind the Visibility property of the Pushpins using a custom IValueConverter that sets the property based on your criteria?
Mark Salsbery
27-May-11 15:03pm
View
Thank you. I still don't see any difference. Most of the properties in the Window classs itself are actually in base classes like Control and UIElement. Your Window-derived "base class" should be no different. Your two classes derived from that class should be no different. I'm going to post a code sample in a solution below....see if this is the same as what you're doing...
Mark Salsbery
27-May-11 14:28pm
View
I may be missing something,but I had no idea what the base class was a base class of....the window class? Some other class? If it's some other class then provide a property in the window class that exposes an object of the other class type....then you can bind to that property and get at its members and base class members.
Mark Salsbery
27-May-11 13:52pm
View
An object of a class includes the members of its base class. Why then is the binding any different?
Mark Salsbery
26-May-11 16:06pm
View
Is the CLSID one of yours or a system/framework one? I'm not experienced with COM so I don't know if it's just a registration issue or an IIS issue...
If I had to guess, I would first think the app pool identity doesn't have access rights to the folder the COM dll is in...
Mark Salsbery
26-May-11 4:54am
View
Deleted
Never mind...see solution...
Mark Salsbery
25-May-11 14:50pm
View
Setting the DataGrid's ItemsSource property to null should clear it. Setting that property to a different value should clear it and use the new value.
You haven't shown any further info about how you're providing data for the grid so it's difficult to provide a more specific answer...
Mark Salsbery
25-May-11 14:42pm
View
Please use the "Reply" button if you want quicker response from me...otherwise I may only find your comment by accident since I don't get a notification email. :)
IIS is a completely different host with many more configuration options, so there are deployment issues (which are minimal with WCF RIA Services).
For debugging with IIS...If you install IIS on your dev machine, you can go to your service host project's properties page, go to the "Web" tab, and in the "Servers" section choose "Use local IIS web server". Click the "Create Virtual Directory" button, and when that succeeds you're all set - if you run your web app in the debugger it will run from IIS server.
Have you gone through these?
Troubleshooting the Deployment of a RIA Services Solution
[
^
]
Deploying an Internet Information Services-Hosted WCF Service
[
^
]
A Guide to Deploying RIA Services Solutions
[
^
]
Mark Salsbery
24-May-11 21:19pm
View
Thanks, and a 5 back at you. I did see your post!
Mark Salsbery
24-May-11 21:11pm
View
That error is pretty generic. Any more info in the innerexceptions of any exceptions you're getting back?
Make sure the app pool your service is running in has sufficient rights for anything your service is doing.
If you're using any authentication schemes, make sure they are turned on and/or configured properly on IIS.
And I always say this, but if you plan to deploy to IIS, then debug on IIS....then you'll catch these problems early :)
Mark Salsbery
23-May-11 21:19pm
View
I'm just saying if you're going to deploy in IIS then why not test there? Regardless it should work the same - it's the Silverlight app doing the navigation, not the host.
Mark Salsbery
22-May-11 10:03am
View
You know, Visual Studio will do your step 2 for you, right from the hosting app's properties :)
But I agree...if you're going to host on IIS you may as well test on IIS as well!
Mark Salsbery
21-May-11 22:16pm
View
If the selecteditem (which is an object reference) and the selectedindex can change between reloading the itemssource, then you have no alternative but to come up with your own scheme to track the previous selected item and find that item's index on the next load.
Mark Salsbery
21-May-11 22:09pm
View
How are you hosting the service?
Mark Salsbery
19-May-11 17:01pm
View
SelectedItem should be an object reference to an item in your data collection...how would it know anything about itemtemplates? :) Of course, if all the items in the collection change each time it's refreshed (as opposed to adding new items to the end of the existing collection), then the SelectedItem will always be different so you'd have to use the index.
Mark Salsbery
18-May-11 23:49pm
View
hmm...no exception either? What's the return value? That simplified one above works for me (even without the extra quotes) on a WPF app as expected. And if you browse to that exe in Windows Explorer and double-click it then it comes up?
Mark Salsbery
18-May-11 12:35pm
View
FWIW, the aspnet_regiis thing is in the first section at that link. Yes it's not Windows 7 specific because IIS isn't windows 7 specific...it's actually part of Windows Server, but since Windows 7 is based on the same platform, IIS can be installed there as well.
Anyway, glad you got it working! Yes it's confusing the first time. I usually have to go back to that documentation when I do a fresh OS install as well :)
Cheers.
Mark Salsbery
18-May-11 3:40am
View
I assume that reply was meant for me but I'm glad you posted it to the OP...(s)he needs to learn that stuff!
Mark Salsbery
18-May-11 2:57am
View
:) Arrays are IEnumerable too, but yes I agree there's better collection types to use.
Show More