|
trey white wrote: host none-WPF windows" you meant NON-WPF windows, and the answer is no
No - I meant the UK English language version which is none. The simplest way to achieve what you want is to implement the other applications as user controls.
"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
|
|
|
|
|
oh ok, sorry I misunderstood you. Is there any way you could expand on that a little? Do you mean I would have to add ALL of my apps to my ribbon bar as user controls(kind of like you did with the first response in XAML?) or just implement them through the code behind files? Sorry, I'm no pro at WPF(or the new WPF ribbon bar) and still getting used to it's massive functionality and robustness so any links or sample code would be MUCH appreciated
Thanks again!
|
|
|
|
|
trey white wrote: Do you mean I would have to add ALL of my apps to my ribbon bar as user controls(kind of like you did with the first response in XAML?) or just implement them through the code behind files?
You can do this with either approach - XAML translates into IL in the same way that code behind does. Tell you what, take a look at my article here[^] which should clarify things a lot more.
"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,
I have a strange problem I cannot seem to solve. I'm using, in Silverlight, and WebClient to invoke a REST service that returns an XML document.
(the example below shows this document as being accessible via the url: "http://localhost/persons.xml"
This is the callback code from a button defined in my XAML :
Private Sub getdata_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
Dim wcProxy As New WebClient()
Dim Uri As New System.Uri("http://localhost/persons.xml")
'setup delegate
AddHandler wcProxy.DownloadStringCompleted, AddressOf wcProxy_DownloadStringCompleted
' invoke service
wcProxy.DownloadStringAsync(Uri)
End Sub
Private Sub wcProxy_DownloadStringCompleted(ByVal sender As Object, ByVal e As System.Net.DownloadStringCompletedEventArgs)
Dim doc As New XDocument
doc = XDocument.Parse(e.Result) <<< ERRORS HERE <<<<
...
...
End Sub
The error on the line marked above says:
An exception occurred during the operation, making the result invalid. Check InnerException for exception details.
and: e.Error.InnerException.Message says: "Security Error"
Not sure why this is. In at atempt to fix this, I have defined a file called 'clientaccesspolicy.xml' in my ASP.NET Web Application, with te following contents:
<access-policy>
<cross-domain-access>
<policy>
<allow-from>
<domain uri="*">
<grant-to>
<resource include-subpaths="true" path="/">
However - I'm not 100% sure if I need this at all, and even if I did, if I implemented it correctly.
I've made no other changes to the default .WEB project that the Silverlight 'New Project' creates for me.
Thanks - S.
|
|
|
|
|
You should probably make sure e.Error is Nothing before trying to use
e.Result in your DownloadStringCompleted handler.
Are you showing the entire error strings returned in the e.Error exceptions?
If this is a cross-domain issue...
Your clientaccesspolicy.xml needs to be published/copied to the root directory of the
website at the domain you are accessing.
What's in your clientaccesspolicy.xml file?
Here's one that should allow any Silverlight cross domain service calls:
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="http://*"/>
<domain uri="https://*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks. that was part of the problem....
I'm also using Apache not IIS, and couldn't succesfully locate the ROOT folder for the web app hosting the service. I switched to IIS, and, got it working which is enough for me for now.
Thanks again
|
|
|
|
|
Hi All,
I have created a simple wpf Custom control and i am trying to add it to vs2008 toolbox so that it can be drag and dropped as normal standard controls.
But i am not able to add it.
Code to add the custom controls to toolbox is in windows application using VB.
this is the method which i have did.
toolboxtabs.Item("WPFCustomControls").ToolBoxItems.Add("TextBox", "WpfCustomControlLibrary.dll", vsToolBoxItemFormat.vsToolBoxItemFormatDotNETComponent)
Can anyone help me out i am great urgency
Thanks in Advance
|
|
|
|
|
Can you add it using Choose Items... on the toolbox?
modified 27-Feb-21 21:01pm.
|
|
|
|
|
I have to do it Programatically.
I am working in Wpf, Visual studio 2008
Thanks In Advance
|
|
|
|
|
I'm finally getting a chance to work with WPF. Making a Button with an Image on it is no problem as long as I don't mind embedding the image in the resource.
What can't get working is to have it load the image from file in a subfolder under the Application at runtime. I don't want it in the embedded resources.
Any ideas? It must be possible to do.
Happy programming!!
|
|
|
|
|
An easy way to do this is to specify a Uri to the image as in the following code:
myImage.BeginInit();
myImage.Source = new BitmapImage(new Uri(file));
myImage.EndInit(); Obviously, you'll have to pass the fully qualified file name into the Uri, but this code will work.
"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
|
|
|
|
|
How does one go about putting it on the button?
It must be possible but documentation on this topic worse than ever and impossible to find.
Happy programming!!
|
|
|
|
|
There same property you set in XAML, you can set in code.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
It's not that hard to do, and there are plenty of samples on the web. Your XAML looks like this:
<Button>
<Image x:Name="myImage" />
</Button>
"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
|
|
|
|
|
Thanks for your assistance.
There are heaps of examples that load images from embedded resources for sure. So far I have found only one that half works the way I need it to work.
Happy programming!!
|
|
|
|
|
I'm glad I could help then.
"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,
How do I import the DLL Libraries and of Paint.Net and use them in my WPF Application?
Paint.Net is an Open Source Program and it comes bundled with the DLL Libraries but when i try loading them in the WPF/VS08/VS10 it says cannot load the DLL.
Thank You,
Cheers.
|
|
|
|
|
What does it say EXACTLY ?
You're not going to be able to do what you're trying to do, in any case.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi.
I have a strange problem to solve. I am new in WPF. I have a gruop of people(admins) who can modify user interface by Visual Studio and we have group who do not have Visual Studio installed and they are not programmers or admins but they should have a ability to modify user interface - the question is how to do that. Can we store user interface made by Visual Studio in database? Can we make own application which can be used just like Visual Studio by people who are not admins or programmers - this app should load interface from DB and modify it and then save it back to the DB. In this app I need drag/drop functionallity, toolbox with controls loaded from DB and Canvas on which user will modify interface. Finally user can save his work to DB and programmers should have ability to load this interface and open it in Visual Studio.
regards
|
|
|
|
|
mpiotrek wrote: Can we store user interface made by Visual Studio in database?
You could, as long as the UI is done entirely in XAML this isn't too hard to achieve. If you use a pattern like MVVM (google it), you don't need to put code behind the view at all. Alternatively, these users could use Expression Blend which was designed for just this task.
"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
|
|
|
|
|
Ok. I understand. Interface would be in XAML. But what with events for example ondrag, onclick etc. Is this a big deal?
|
|
|
|
|
Take a look at MVVM - you can separate your logic out into something called a ViewModel. I wrote an article[^] a couple of months ago that used MVVM and there's virtually no code behind the views. Download it, read through the code, and read up on the pattern. Sacha Barber's currently running a series on MVVM in WPF that is well worth reading, and you can find more information from the likes of Josh Smith and Karl Shifflett.
"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,
I am writing a WPF application (www.tabbles.net) with file managament capabilities. I need to show the same file context menus that Explorer does. I assume I have to query all shell extensions installed on the user's machine. In particular, for each shell extension, I have to invoke IContextMenu::QueryContextMenu[^]. The problem is that QueryContextMenu requires an HMENU as argument, but I am using the WPF ContextMenu class, which does not seem to have a method for obtaining an HMENU. How can I obtain the required HMENU to pass to the QueryContextMenu? Thanks a lot for any solution or workaround to my problem.
modified on Monday, August 17, 2009 5:09 AM
|
|
|
|
|
HMENU is actually a handle to the menu. In order to get a handle, you need to wrap your context menu in a HwndSource object, which gives you the handle you need.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi Guys
I want to add a selection effect to my 3d models so that when I select a model it fades to another color, and when deselecting it, it should fade back to it's original color again. The idea I have is to create a Storyboard, and somewhere in the code behind start the Storyboard when a certain model is selected, but, how would I go about specifying the actual fade effect e.g brown to red?
|
|
|
|