|
fjparisIII wrote: I don't expect you to write such a class.
When I write for my blog, I normally try to create a functioning application to work things out. That way I don't end up looking like a total nugget.
"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
|
|
|
|
|
Did you ever get around to trying this? I've run out of important things to do on my project so this is next. I'm going to investigate the information on the link you provided and see how far I get.
|
|
|
|
|
I tried to get the code in the link you provided to work and it's an utter joke. It doesn't work at all. I get the following exception: "The image data generated an overflow during processing." Real helpful. I only found one reference on the WEB to that message. Someone asked what it meant and no one answered.
I've read dozens and dozens of posts about people failing in the attempt to copy metadata under WPF. It just doesn't work. The fact that you never responded back after expressing an intention to see if you could get it to work tells me that you failed as well.
|
|
|
|
|
Does anyone here have any thoughts or comments on this?
Because of the way that Silverlight apps run it seems to me that it would be simpler to store stuff that would typically go into a cookie in isolated storage. However, the users expectation to be able to clear data by using the Internet properties window would not (I think) have an impact any any of these stored settings so...
Thoughts?
|
|
|
|
|
Even though they can be used the same way, they are different.
Isolated storage provides a complete virtual file system to a restricted
application, which is much more robust than cookies.
I don't have good "answer" for this, but I would say - examine the pros and cons of both
and use what's appropriate.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Put a GUID in the cookie, store that GUID in your isolated storage, if they go to the page and the GUID is missing then wipe the part of the isolated storage you would have expected the user to "clear" by manually clearing it. This way you can properly clear user data, but get the benefits of using local storage instead of a cookie.
(If it's a security issue, put a key in the cookie instead of a GUID).
|
|
|
|
|
Good people,
I have a few quick questions.
1) Is it ok to use data binding and value converters in data templates defined in my resource dictionary?
2) If so, is it a bug in my expression blend that it is not allowing me to do that?
3) If I can't what is the best work-around.
Any information you provide would be greatly appreciated.
Thank,
Blitz
|
|
|
|
|
Yes you can do this. I do it all the time.
Check you converter. Your converter must be able to handle a null value being passed in without throwing an exception.
Please post your converter code.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
First, thanks for replying. I really appreciate your help.
Below is the code for my value converter:
<code>
public class DoubleToStringEventAverageDuration : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
double average = (double)value;
int digits = 1;
return Constants.EventLogisticsAverageDuration + Math.Round(average, digits).ToString();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
// Not implemented
return Constants.EmptyNumericValue;
}
}
</code>
Let me know your thoughts.
Thanks,
Blitz
|
|
|
|
|
You MUST add a null check for value before ever using it. If it's null (like when it's in the designer because there is no data) this will be a big problem.
If value is null, just return a default value that makes sense, like 0.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Thanks again,
I thought "double" couldn't be null.
So should I change it from the explicit cast and use the "as" cast then test for null?
Blitz
|
|
|
|
|
double can't, but object can, and you're casting from an object to double. Try using double.TryParse in the conversion, e.g.
double doublevalue = 0M;
double.TryParse(value, out doublevalue);
"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
|
|
|
|
|
No check if value is null. If it is return a sensible value like 0.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Thank you both. I made the corrections.
It seems, however, that Blend still won't do it. In fact, it is not even allowing me to do the databinding in templates within the resource dictionary (when I use the designer).
I figure it must be a bug with Blend.
Thanks again,
Blitz
|
|
|
|
|
Hey all,
I have done a few wpf apps now and decided to make a deployable xbap app. I am mucking around with ellipses and wanted to be able to move an ellipse in a canvas. I have done this fine using the mouse click (i.e. if clicked move ellipse right 20) but for some reason I can't handle the keyup events in the app?
Can an xbap handle page level key presses?
Thanks
Some days robin you just can't get rid of a bomb.
|
|
|
|
|
Hi
anyone please help.
I want multi lingual support for my product developing in silverlight
I read many articles from Net, but coul'd sucessfully implement it.
I am unable to read strings from Resource file and show in the different language chosen.
although I changed in InternetExplorer settings, only default language is shown(interestingly the silverlight controls' names are getting changed)
Regards,
Manju
|
|
|
|
|
|
Hi i am having a problem in silverlight datagrid.My requirement is to add a row dynamically to the datagrid and also place a custom control in the cells of the row that is added.
|
|
|
|
|
To add a row dynamically, you would typically just add an item to the collection
providing the row data. What are you using for row data?
To place a custom control in a cell, you can use a DataGridTemplateColumn.
See Defining Columns for a Silverlight DataGrid[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi i am new to silverlight.I am having a doubt.
I added two textboxes and a button.
<textbox x:name="txtFirst" grid.column="0" grid.row="0" height="20" width="50" xmlns:x="#unknown">
<textbox x:name="txtSecond" grid.column="0" grid.row="1" height="20" width="50" xmlns:x="#unknown">
So,now when i click the button,one text box should become as the child of the other.So please help me on this issue.
|
|
|
|
|
hi suresh!!!
Does it mean that u want to add text box inside Textbox??? .. Instead of that u
can use a listbox and add a text box to it...
Samir
|
|
|
|
|
No,I don't want to add a textbox inside a textbox.But i want to make it as the child to the first textbox.That means like a hierarchical structure (parent and child's).
|
|
|
|
|
That doesn't make sense.
A control that is a child of a parent control generally implies the child is
embedded in the parent.
So what are you talking about?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi, I am trying to port a sample application that I found online here:
http://www.shinedraw.com/3d-illusion/flash-vs-silverlight-3d-image-space/#comment-2085
from Silverlight 2.0 to WPF. I am rather new to both Silverlight and WPF, and I am doubtlessly missing something rather obvious in this type of porting procedure. Here is a link to the project file as I modified it:
http://www.mediafire.com/?mzwmy3nmmyd
|
|
|
|
|
WTH.
I thought I wanted to help on this so I was stupid enough to go to the mediafire link.
What a spam filled crap link.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|