|
Hi please recommend any third party api for Line Chart. which has the feature of Zooming and panning and should be allowed 200,000 points.
Please let me know
|
|
|
|
|
I dont know if the charting toolkit provided on codeplex can help you - its open source.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
|
I'm trying to reference my Project Model class from another project from within my UI project:
<Window x:Class="Abtech.Spares.UI.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local="clr-namespace:Abtech.Spares.DataModel.Models;assembly=Abtech.Spares.DataModel.Models"
Title="My App"
Height="600"
Width="800">
I'm trying to reference it in
<Window.Resources>
<DataTemplate x:Key="Project" DataType="{x:Type local:ProjectModel}">
<StackPanel Orientation="Horizontal">
<Image Source="/Abtech.Spares.UI;component/Media/Graphics/Sidebar/project_16x16.png" Margin="0,0,2,0"></Image>
<TextBlock Text="{Binding ProjectName}" />
</StackPanel>
</DataTemplate>
</Window.Resources>
The compiler is highligting this line
xmlns:local="clr-namespace:Abtech.Spares.DataModel.Models;assembly=Abtech.Spares.DataModel.Models"
and telling me that the assembly is not found. The assembly is referenced in this project.
The error is
Assembly 'Abtech.Spares.DataModel.Models' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built.
I'm not quiet sure what to do about this.
Everything makes sense in someone's mind
modified on Wednesday, April 27, 2011 4:58 PM
|
|
|
|
|
Try cleaning your solution once.
Also try to make sure that 'Abtech.Spares.DataModel.Models' exists within the assembly that you have referenced.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
The data model project is in my solution and I referenced the project from the UI project, which is where this error is occuring. Other classes in the UI are using the models, so the problem cannot be a reference issue. It's just this one XAML file that doesn't like it.
Everything makes sense in someone's mind
|
|
|
|
|
|
I think you should actually READ the contents of the links you posted before spouting this all over the WPF forum ...
|
|
|
|
|
guy, again, like i said to many, "If you have no answer, move on"
Don't litter my thread.
dev
|
|
|
|
|
Calm down, there...
The namespace URLs aren't websites... They're basically just aliases, and you can create your own in your Assembly.cs:
[assembly: XmlnsDefinition("http://my.make.believe.xaml.namespace.com/something", "My.CLR.Namespace")]
The advantage is that one XML namespace can refer to multiple CLR namespaces:
[assembly: XmlnsDefinition("http://my.make.believe.xaml.namespace.com/something", "My.CLR.Namespace")]
[assembly: XmlnsDefinition("http://my.make.believe.xaml.namespace.com/something", "My.CLR.Namespace.Stuff")]
[assembly: XmlnsDefinition("http://my.make.believe.xaml.namespace.com/something", "My.CLR.Namespace.More.Stuff")]
I agree that using "http" as the prefix is kind of silly (I'm guessing there was some sort of reason for it, but not looking it up right now)... But it works.
|
|
|
|
|
I don't think there is any requirement that it be an http string. It can be pretty much anything. Http is just what people use because its easy to remember (way easier then URI syntax), and it looks cool.
|
|
|
|
|
I was actually wondering about that... I think it would have made more sense to use "ns://"... Does anyone actually memorize it anyway? If it wasn't for Intellisense, I'd be looking it up online every time.
EDIT: Hmm, after seeing Pete's link... Guess using HTTP is logical... Just being standards-compliant.
|
|
|
|
|
|
Makes a change
|
|
|
|
|
Ian Shlasko wrote: I agree that using "http" as the prefix is kind of silly (I'm guessing there was
some sort of reason for it, but not looking it up right now)... But it
works.
There is a perfectly valid reason. Remember that XAML is XML Application Markup Language; the use of the URI is in line with the convention for assigning namespaces in XML. There's an "interesting" read on XML Namespaces here[^].
|
|
|
|
|
that's a long reading... yike. you think it's worthwhile? (although i've started reading it...)
dev
|
|
|
|
|
devvvy wrote: you think it's worthwhile?
Not really. That's why I put quotes around interesting - it was being ironic.
|
|
|
|
|
W3 docs really are impenetrable
|
|
|
|
|
Hi guys,
I think I have the answers - collected from couple places posting here to share with everybody
In Xaml root element "Window" or "UserControl", one would typically find:
<br />
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br />
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" <br />
xmlns:Infra="http://infragistics.com/DockManager" <br />
xmlns:MyLib1="clr-namespace:AbcFirm.Lib1"<br />
xmlns:MyLib2="clr-namespace:AbcFirm.Lib2" <br />
xmlns:MyLib3="clr-namespace:AbcFirm.Lib3" <br />
xmlns:sys="clr-namespace:System;assembly=mscorlib"<br />
1. Default namespaces
--------------------------------------------------------
One point worth noting, defaults reference CANNOT be removed, or changed even though XamlParser won't go online and visit the actual reference
<br />
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br />
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<br />
Give it a try. If you remove or change these two defaults, you'd get compiler error. The following would NOT compile for instance.
<br />
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentationXXXXX"<br />
xmlns:x="http://schemas.microsoft.com/winfx/2006/xamlXXXXX"<br />
xmlns:sys="clr-namespace:System;assembly=mscorlib"<br />
These two defaults namespaces are probably defined in "XmlnsDefinition" tag in "AssemblyInfo.cs" of WPF dll.
<code>
[assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation[^]", "")]
[assembly: XmlnsDefinition("http"//ImUseless.com/DoNothing[^]", "x")]
</code>
So while Xaml processor wont go online and actually parsed the referenced url's - they are compiled into the referenced dll's and you cannot just put some garbage there!
This is described on MSDN[^]
<br />
The root element also contains the attributes xmlns and xmlns:x. These attributes indicate to a XAML processor which XAML namespaces contain the type definitions for backing types that the markup will reference as elements. The xmlns attribute specifically indicates the default XAML namespace. Within the default XAML namespace, object elements in the markup can be specified without a prefix. For most WPF application scenarios, and for almost all of the examples given in the WPF sections of the SDK, the default XAML namespace is mapped to the WPF namespace http:
2. Custom namespaces
---------------------------------------------------------------
For actual namespace reference, which doesn't reference "Url" - they are for real, referenced namespace must exists (Or else compile error).
<br />
xmlns:MyLib1="clr-namespace:AbcFirm.Lib1" <br />
xmlns:MyLib2="clr-namespace:AbcFirm.Lib2" <br />
xmlns:MyLib3="clr-namespace:AbcFirm.Lib3" <br />
xmlns:sys="clr-namespace:System;assembly=mscorlib"<br />
xmlns:igDock="http://infragistics.com/DockManager" << NOTE: You don't necessarily need to use "clr-namespace", you can rely on [assembly: XmlnsDefinition] instead)<br />
In above example, you'd find from "AssemblyInfo.cs" (you'd need to add "using System.Windows.Markup") of relevant Infragistics's dll something similar to:
<br />
[assembly: XmlnsDefinition("<a href="http:
dev
modified on Thursday, April 28, 2011 10:56 PM
|
|
|
|
|
devvvy wrote: xmlns:MyLib1="clr-namespace:AbcFirm.Lib1" < Cool, no useless Url's
devvvy wrote: xmlns:Infra="http://infragistics.com/DockManager" < Why....
I'll answer this one by considering both cases. With the clr-namespace declaration, you have to add each assembly in to your namespace mapping, one at a time. With the URI version, you can add one declaration and get multiple DLLs referenced in one go. Instead of having xmlns:MyLib1 , xmlns:MyLib2 and xmlns:MyLib3 , your example would just need xmlns:MyLib="http://ImUseless.com/DoNothing" .
|
|
|
|
|
thanks but I found the answer!
dev
|
|
|
|
|
Hello friends,
I have a datagrid having a column name as Download and I have kept a hyperlink button for that.
On that hyperlink button click,I want to open an csv file whose path is in database.The path is like:
D:\Project\SynchModule\SynchModuleSL.Web\Pendings\new 1_2.csv
and the file does exists in Pending Folder.
How do I open that file on Hyperlink button click??
Please treat this as an urgent thread.
pls reply
Thanks
Piyush
|
|
|
|
|
Piyush Nandanwar wrote: Please treat this as an urgent thread.
Here's a friendly piece of advice: that's not the way the forums work. This is a volunteer only site - you aren't paying for support, so you get answers based on the timescales of the poster, not on any arbitraty timescale you have to work to.
Saying that, what you should look at is using the WebClient class to download the file as an asynchronous file from the server to the client (the clues to the code you need to write are all in that sentence). You do need to be aware that your web server must have permissions to read from the folder.
|
|
|
|
|
Hi Pete
Suppose,I have permissions to access the files from server.What should I write in code to open the csv file,on hyperlink button click??
|
|
|
|
|
Well, you could always google Silverlight WebClient download file and see what you get. I did say that all the clues were in my original post. In future, I'd expect you to at least try to write the code yourself - honestly, it's not that hard. As I'm in a good mood though, you're going to need a variation of this:
private void DownloadFileClick(object sender, RoutedEventArgs e)
{
var webClient = new WebClient();
webClient.OpenReadCompleted += new webClient_OpenReadCompleted;
webClient.OpenReadAsync(new Uri(the path to the url here, UriKind.Absolute));
}
void webClient_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
bool? result = sfd.ShowDialog();
if (result.HasValue && result.Value == true)
{
using (var sr = new StreamReader(e.Result))
{
string str = sr.ReadToEnd();
using (var sw=new StreamWriter(sfd.OpenFile()))
{
sw.Write(str);
}
}
}
}
|
|
|
|