|
|
If you follow my sig, you can download a tool called MoXAML PowerToys[^] which contains a handy addin for formatting XAML with a predefined set of rules (and it doesn't crash Visual Studio). I have more details here[^] on what the tool does.
|
|
|
|
|
Ta Pete,
unfortunately because the different devs prefer different layout it means the tool makes every line of Xaml appear to have changed when one does a Diff in TFS - which is what I'm trying to avoid.
|
|
|
|
|
Hi,
In my application I am using silverlight 4.0, Wcf RIA services and entity frame work. Some time it giving me domain service time out error so I want to extend the domain service response time so might be I can overcome from this error.
So how can I reset the domain service tiemout or any other solution to get out fromthis situation.
Thanks in advance.
Saurabh Jain
|
|
|
|
|
You might find it better to put this in the WCF forum[^] as this seems to be more of a WCF thing rather than Silverlight.
|
|
|
|
|
Can we delete downloaded xap files from client machine in silverlight 4.0
|
|
|
|
|
Not unless you have heightened rights on the computer, Silverlight has no access to the file system without the users specific involvement.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Clearing the temporary internet files should ideally remove the xap files.
|
|
|
|
|
Is it possible to create bindings based on lookup values? (I think that's what I'm trying to do)
Say I had a List of items, that I was already binding too, could I use a property of one of those items as a lookup in another list?
I've got the lists defined in my ViewModels ok, and if I want to display the lookup list I've got that working. But I'm not sure how to get other list to relate to the lookup
I *think* a converter might be required, but I'm not sure.
I could *cheat* a put the lookup list in the Model, but that doesn't seem the right approach at all...this is a view only thing.
|
|
|
|
|
cjb110 wrote: I could *cheat* a put the lookup list in the Model, but that doesn't seem the right approach at all...this is a view only thing.
You've almost provided an answer to your own question: The viewmodel you are binding to can have the value being bound and the lookup list(s) being used. That way, when the bound "master" property changes, the view model handles/cascades the update to the dependant lookup list. Here is some psuedocode to try and help explain what I mean:
public class FooViewModel : INotifyPropertChanged
{
string _boundProperty;
public string BoundProperty
{
get
{
return _boundProperty;
}
set
{
if(_boundProperty != value)
{
_boundProperty = value;
NotifyPropertyChanged("BoundProperty");
NotifyPropertyChanged("DependantProperty");
}
}
}
public List<Foo> DependantProperty
{
get
{
return MyMasterListOfFoo.Where(x=> x.Bar ==BoundProperty).ToList()
}
}
}
BoundProperty is the propert that gets changed to kick off the changes and is bound to some control in your XAML. DependantProperty is bound to the control that will be updated when BoundProperty changes
|
|
|
|
|
Ah that makes sense!
In my case I wanted to provide a visual indication that text items where different.
I didn't care about the colour used though, so I originally created a random colour in a collection in the VM and it was that collection I was trying to lookup.
But I realised that as long as the colour was the same for the same string, then the conversion from string to colour had nothing to do with my model or viewmodel.
So I created an IValueConvertor:
public class StringToColorConvertor : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (!(value is string))
throw new ArgumentException("value is not a string");
string text = (string) value;
byte[] data;
using (MD5 md5 = MD5.Create())
data = md5.ComputeHash(Encoding.UTF8.GetBytes(text));
return new SolidColorBrush(Color.FromArgb(150, data[0], data[7], data[15]));
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
If your using similar ish strings you might get colours close together, but for my set of 5 pairs, each colour was different enough to be recognizable.
|
|
|
|
|
Hi All,
I have developed an application in WPF with SQL server as database and the database table contains image data types also.
My data base server is and centralized one and am accessing it via internet thorough sql adapter.
Problem
Now i have problem that it is taking more time to fetch the image data type records and also normal data also taking much time to fetch via internet.
Clarification
1) I have an idea to convert this application to web so that the application server and the database server in the same box will retrive it faster and give the result.
My application is in WPF, the best easy method is to convert it into silver light or wpf browser appliation? if it is wpf browser application can i host it into iis?
2) Or can i have the wpf application as such and change the database hit to the webservices? will webservice respond faster for data fetching also with the image data types?
thanks in advance for your time in helping me pulling out of this crisis.
|
|
|
|
|
A WPF application can be hosted on IIS by making it an xbap (WPF browser based) application[^].
However, in your case, this will still not solve the performance issue you are facing with images.
Optimizing WPF Application Performance [^] might help you try to render images faster.
|
|
|
|
|
Dear Abhinav,
Thanks for your time in replying to my question.
You mentioned that eventhough my application after converted to xbap application it wont work for images.
But my question is, am going to host the database server and the IIS server in the same machine. In that case it should work fine right?
my windows application is working fine for this case.. when my application and the database server in the same machine its working fine.
But i have one doubt. I read in the google that when ever user clicks the xbap , it will internally handles the exe downloads and all.
Which means that everytime the user clicks the link will it downlaod the exe application? and will it run from local machine?
can you please help me to get clarified on this?
that is the case once again its going to be a windows application and will have same image problem?
modified 5-Nov-12 6:13am.
|
|
|
|
|
Hi,
I have few input controls in my ClaimsReport.xaml, based on the user input i have to hit the database fetch records and display those records in UI with header & footer. Along with I have to provide print option to generate the report with header and footer & export to Excel, .csv, .txt formats. Please suggest or share me how to achieve it. Refer the below screenshots.
<a href="C:\Users\sathees_km\Documents\Claims Report.jpg">Window Design</a>
<a href="C:\Users\sathees_km\Documents\Report Data.jpg">Report Data</a>
Regards,
Satheeskumar Manickam
modified 30-Oct-12 6:50am.
|
|
|
|
|
Please explain more clearly what your problem is; I don't think anyone is going to write this code for you.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
As Silverlight does not have a decent reporting interface we use SSRS to create an embedded (local RDLC report) this is generated in the WCF on the server where there are no restrictions on data. The report is passed to the SSRS on the server and exported to a PDF file.
This PDF is then passed back to the client as a binary file and displayed via Telerik PDF viewer.
I'm not sure whether this is a valid solution for you but it has a number of benefits:
SSRS is excellent for building and maintaining reports
The same report can be used in SSRS server
I don't need a dedicated SSRS Viewer (approx $500) I can used any Silverlight PDF viewer
I don't need to deal with the export issues, Telerik does all that out of the box.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Are you saying that your chart component is a WinForms component which you are trying to use in a WPF application? If so, you don't need to worry about DPs (the shorthand name for Dependency Properties). The big question I have to ask here, is have you added the control into a WindowsFormsHost container? An example would look like this
<Grid>
<WindowsFormsHost>
<myNamespace:MyChartControl />
</WindowsFormsHost>
</Grid> Then, you just add your configuration as you see fit.
|
|
|
|
|
Hi Pete.
No, I have modified the chart so that it can be used in WPF applications without WinFormsHost. It's a WPF component without DP's. The chart object itself is derived from ContentControl but it's properties and their sub-properties are normal classes - not derived from Dependency Object.
modified 15-Dec-21 21:01pm.
|
|
|
|
|
What does the rest of the exception say?
|
|
|
|
|
That is all it says. It's a small message box that says "An exception has been thrown" or something like that and it has a "Details" button which shows "Exception of type 'MS.Internal.Validate+ValidationFailure' was thrown.".
modified 15-Dec-21 21:01pm.
|
|
|
|
|
Have a look in EventViewer. I suspect you'll find a fuller message there.
|
|
|
|
|
Nothing there.
modified 15-Dec-21 21:01pm.
|
|
|
|
|
Unfortunately, there's not enough context there to figure it out I'm afraid. Do you have VS SP1 installed?
|
|
|
|