|
Thanks for the reply Ebert,
I returned list only from the wcf service. Is there any alternative way to get data from the database without WCF service?
Ravi Vellanki,
AP,India.
|
|
|
|
|
Is there something special I have to do to get the direction arrows to show up in the DataGrid that comes with the WPFToolkit? The columns sort okay, but I don't get any direction arrows...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John,
The arrows will always show after the column header is clicked.
To get them to show on form open, in your XAML set the SortDirection property.
<toolkit:DataGridTextColumn Binding="{Binding FirstName}" SortDirection="Descending" Header="First Name" />
modified 27-Feb-21 21:01pm.
|
|
|
|
|
I'm observing significant scrolling/sorting performance problems with a RadGridView object, and I wanted to try manually populating the grid instead of using data binding to see if that would solve the issue. However, I'm stuck.
Exactly how would I go about adding the rows from the dataset to the Items collection in the grid? I tried this:
dataGridRad.Items.Add(dt.Rows[rowNumb]);
but I get no rows in the grid.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I suspect you have to follow the steps laid out here[^].
"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
When the button is clicked it changes to another page (UserControl), but
if they click the button fast a couple of times it crashes. That is because the service isn't finished with getting data from the database, which the other pages need. I don't want to use IsEnabled=false, is there another way?
Thanks
Fia
|
|
|
|
|
Why do you not want to do IsEnabled=false? An alternative could be to set a flag when you click the button the first time and reset it when the service has finished getting data; then it wouldn't matter whether or not the user multipresses the button, you won't make the call until the flag says it's okay to do so.
"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 Thanks for your reply
But it doesn't work with IsEnabled, I use that button to navigate to a different page, and the button is the same for every page. In one page the user writes the his username and password. If It's right I get the data from that user and move on to a different page when that button is clicked. In another page the users can choose someting from a combobox, when that is choosen and the button is clicked, the data is fetched regarding what was choosen in the combobox. I tried to use IsEndabled=false, but if the user clicks several times, it navigates several pages. It seems like the the button clicks are saved and when the button's IsEnabled=true, it moves the count that the button was clicked.
Please help
Fia
|
|
|
|
|
You could always change it's visibility so that it can't be clicked, and only make it visible when it's the right time to do so.
"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
|
|
|
|
|
Easiest way is just to mask the button. Put a rectangle in the same container that is the width/height of the button and make it transparent. When inside grids, etc, order matters - the rectangle should be represented AFTER the button so it is in the foreground. By default, set the visibility to collapsed. When the user clicks, set it to visible until you are done initializing, then collapse it again. It will mask any clicks or UI events but not fudge the UI.
<Grid>
<Button/>
<Rectangle Fill="Transparent"/>
</StackPanel>
<div class="ForumSig">Jeremy Likness
Latest Article: <a href="http://www.codeproject.com/KB/cs/Collections_Part_1.aspx">Whats in Your Collection? Part 1 of 3: Interfaces</a>
Blog: <a href="http://csharperimage.jeremylikness.com/" target="_blank" title="CSharper Image">C#er : IMage</a></div>
|
|
|
|
|
Does anyone know how to do this? I've looked on every website i could possibly think of and still haven't found what I'm looking for. Basically this is what i want to do/accomplish:
1. I have a pretty big project(around 70k lines ) that I'm trying to add a universal ribbon bar to the top of, each app being able to click through the tabs to get to the common functionality that will be available to that app
2. I have already created the ribbon(thanks to the walkthroughs of uxpassion.com ) that has a nice look and feel for what i want, but it is a WPF application(per the walkthrough) with XAML and a .cs file for all the method calls and functionality the XAML and ribbon require to work
3. I would like to know(if it's possible because i haven't found it anywhere on the web ) if i can use what i have now for my ribbon bar(code and all) and somehow place it at the top of all my different projects' pages so as to have the 2007 Office look no matter what you're looking at
I know this may be a noobie question that i just have overlooked or missed somewhere, but I would really appreciate anything that could help me acheive this(kind of on a deadline) so that my project will look professional
Thanks in advance!
|
|
|
|
|
I'm a bit confused as to what you're actually asking. Are you asking whether you can host none-WPF windows inside the application so that they appear to be running inside a ribbon enabled WPF application? If you are, then yes you can - as long as you add the WindowsFormsIntegration and System.Windows.Forms assemblies as in the following:
<Window x:Class="WpfForm.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:myForm="clr-namespace:MyFormsNamespace;assembly=MyFormsApp"
Title="Host in WPF" Height="400" Width="300"
>
<Grid>
<wfi:WindowsFormsHost>
<myForm:MyWindowForm />
</wfi:WindowsFormsHost>
</Grid>
</Window> In this sample, you can see that I've added the windows form inside the WindowsFormsHost .
"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 Peter for your reply, but I'm guessing that when you said "host none-WPF windows" you meant NON-WPF windows, and the answer is no. All of the projects that have been coded already are in WPF(with a c# back code), and what I would like to do is have a ribbon bar(which I've already created as a WPF application per uxpassion.com) at the top of each of my apps as to give the Office 2007 impression and functionality but with my own code of course I have it set up right now in my ribbon for taking the functions to call from each app, but I haven't got the ribbon to act as a resource ontop of each app's GUI. Does this make sense or clear what I would like to do? Thanks again
|
|
|
|
|
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!!
|
|
|
|